cleanup (Gaute)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Aug 2007 13:11:03 +0000 (13:11 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Aug 2007 13:11:03 +0000 (13:11 +0000)
HLT/TPCLib/AliHLTTPCConfMapFit.cxx
HLT/TPCLib/AliHLTTPCConfMapTrack.cxx
HLT/TPCLib/AliHLTTPCConfMapper.cxx
HLT/TPCLib/AliHLTTPCGlobalMerger.cxx
HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx
HLT/TPCLib/AliHLTTPCSliceTrackerComponent.h
HLT/TPCLib/AliHLTTPCTrack.cxx
HLT/TPCLib/AliHLTTPCTrackArray.cxx

index 126097f..3a36921 100644 (file)
@@ -95,8 +95,6 @@ Int_t AliHLTTPCConfMapFit::FitHelix()
   return 0;
 }
 
-// #### -B0-CHANGE-START == JMT
-
 Int_t AliHLTTPCConfMapFit::FitStraightLine() {
     //fit the straight line 
     if(FitLineXY()) {
@@ -112,8 +110,6 @@ Int_t AliHLTTPCConfMapFit::FitStraightLine() {
     return 0;
 }
 
-// #### -B0-CHANGE-END == JMT
-
 Int_t AliHLTTPCConfMapFit::FitCircle()
 {
   //-----------------------------------------------------------------
@@ -567,8 +563,6 @@ Int_t AliHLTTPCConfMapFit::FitLine ( )
 } 
 
 
-// #### -B0-CHANGE-START == JMT
-
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //    Straight Line Fit  in x-y plane
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -772,4 +766,3 @@ Int_t AliHLTTPCConfMapFit::FitLineSZ ( ){
     return 0;
 }
 
-// #### -B0-CHANGE-END == JMT
index 18e40f4..066cd41 100644 (file)
@@ -229,7 +229,6 @@ void AliHLTTPCConfMapTrack::Fill(AliHLTTPCVertex *vertex,Double_t max_Dca)
 {
     //Fill track variables with or without fit.
     
-// #### -B0-CHANGE-START == JMT
     // for straight line fit
     if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
 
@@ -260,18 +259,17 @@ void AliHLTTPCConfMapTrack::Fill(AliHLTTPCVertex *vertex,Double_t max_Dca)
     }
     // for helix fit
     else { 
-// #### -B0-UNCHANGED-START == JMT
-       //fRadius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
-       Double_t radius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
-       SetRadius(radius);
-       
-       //fPt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * fRadius);
-       Double_t pt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * GetRadius());
-       SetPt(pt);
-       
-       if(GetPt() > max_Dca) //go for fit of helix in real space
+      //fRadius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
+      Double_t radius = sqrt(fa2Xy*fa2Xy+1)/(2*fabs(fa1Xy));
+      SetRadius(radius);
+      
+      //fPt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * fRadius);
+      Double_t pt = (Double_t)(AliHLTTPCTransform::GetBFieldValue() * GetRadius());
+      SetPt(pt);
+      
+      if(GetPt() > max_Dca) //go for fit of helix in real space
        {
-           AliHLTTPCConfMapFit *fit = new AliHLTTPCConfMapFit(this,vertex);
+         AliHLTTPCConfMapFit *fit = new AliHLTTPCConfMapFit(this,vertex);
     /* Matthias 13.12.2006
      * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
      * and has always been kTRUE.
@@ -281,30 +279,28 @@ void AliHLTTPCConfMapTrack::Fill(AliHLTTPCVertex *vertex,Double_t max_Dca)
      * anyway. 
            ComesFromMainVertex(AliHLTTPC::DoVertexFit());
      */
-           ComesFromMainVertex(kTRUE);
-           fit->FitHelix();
-           
-           //AliHLTTPCConfMapPoint *lHit = (AliHLTTPCConfMapPoint*)fLastHit;
-           AliHLTTPCConfMapPoint *fHit = (AliHLTTPCConfMapPoint*)fFirstHit;
-           SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
-           
-           UpdateToFirstPoint();
-           
-           delete fit;
+         ComesFromMainVertex(kTRUE);
+         fit->FitHelix();
+         
+         //AliHLTTPCConfMapPoint *lHit = (AliHLTTPCConfMapPoint*)fLastHit;
+         AliHLTTPCConfMapPoint *fHit = (AliHLTTPCConfMapPoint*)fFirstHit;
+         SetLastPoint(fHit->GetX(),fHit->GetY(),fHit->GetZ());
+         
+         UpdateToFirstPoint();
+         
+         delete fit;
        }
-       else if(GetPt() == 0) 
+      else if(GetPt() == 0) 
        {
-           LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
-               "Found track with Pt=0!!!"<<ENDLOG;
+         LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
+           "Found track with Pt=0!!!"<<ENDLOG;
        }
-       else
+      else
        {
-           LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
-               "Track with pt<max_Dca :"<<GetPt()<<ENDLOG;
+         LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapTrack::Fill","Tracks")<<AliHLTTPCLog::kDec<<
+           "Track with pt<max_Dca :"<<GetPt()<<ENDLOG;
        }
-// #### -B0-UNCHANGED-END == JMT
     }
-// #### -B0-CHANGE-END == JMT
 }
 
 Int_t AliHLTTPCConfMapTrack::GetMCLabel()
index c7db9f3..27c79a0 100644 (file)
@@ -361,11 +361,9 @@ void AliHLTTPCConfMapper::MainVertexTracking()
 
   Double_t initCpuTime,cpuTime;
   initCpuTime = CpuTime();
-// END ################################################# MODIFIY JMT
-#if 0
-  SetPointers(); // moved to Component
-#endif
-// END ################################################# MODIFIY JMT
+
+  SetPointers(); 
+
   SetVertexConstraint(true);
       
   ClusterLoop();
@@ -393,6 +391,9 @@ void AliHLTTPCConfMapper::NonVertexTracking()
     }
   
   SetVertexConstraint(false);
+  
+  SetPointers(); //To be able to do only nonvertextracking (more testing) 
+  
   ClusterLoop();
   LOG(AliHLTTPCLog::kInformational,"AliHLTTPCConfMapper::NonVertexTracking","ntracks")<<AliHLTTPCLog::kDec<<
     "Number of nonvertex tracks found: "<<(fNTracks-fMainVertexTracks)<<ENDLOG;
@@ -726,17 +727,10 @@ AliHLTTPCConfMapPoint *AliHLTTPCConfMapper::GetNextNeighbor(AliHLTTPCConfMapPoin
                     
                      if(track)//track search - look for nearest neighbor to extrapolated track
                        {
-// BEGINN ############################################## MODIFIY JMT
-#if 1
-                           if (fVertexConstraint) {   
-                               if(!VerifyRange(starthit,hit))
-                                   continue;
-                           }
-#else
-                         if(!VerifyRange(starthit,hit))
-                           continue;
-#endif
-// END ################################################# MODIFIY JMT                     
+                         if (fVertexConstraint) {   
+                           if(!VerifyRange(starthit,hit))
+                             continue;
+                         }
                          testhit = EvaluateHit(starthit,hit,track);
                          
                          if(testhit == 0)//chi2 not good enough, keep looking
@@ -753,17 +747,10 @@ AliHLTTPCConfMapPoint *AliHLTTPCConfMapper::GetNextNeighbor(AliHLTTPCConfMapPoin
                          
                          if((dist=CalcDistance(starthit,hit)) < closestdist)
                            {
-// BEGINN ############################################## MODIFIY JMT
-#if 1
-                           if (fVertexConstraint) {   
+                             if (fVertexConstraint) {   
                                if(!VerifyRange(starthit,hit))
-                                   continue;
-                           }
-#else
-                         if(!VerifyRange(starthit,hit))
-                           continue;
-#endif
-// END ################################################# MODIFIY JMT   
+                                 continue;
+                             }
                              closestdist = dist;
                              closesthit = hit;
                         
index a4847a4..1aaeef5 100644 (file)
@@ -283,7 +283,7 @@ void AliHLTTPCGlobalMerger::Merge()
          ismatched0[s0]=kFALSE;
          AliHLTTPCTrack *track0=ttt0->GetCheckedTrack(s0);
          if(!track0) continue;
-         track0->CalculateHelix();
+         //track0->CalculateHelix();    //This it done in TrackArray
          track0->CalculateEdgePoint(angle);
          if(track0->IsPoint()) 
            {
@@ -296,7 +296,7 @@ void AliHLTTPCGlobalMerger::Merge()
          ismatched1[s1]=kFALSE;
          AliHLTTPCTrack *track1=ttt1->GetCheckedTrack(s1);
          if(!track1) continue;
-         track1->CalculateHelix();
+         //track1->CalculateHelix();   //This is done in TrackArray
          track1->CalculateEdgePoint(angle);
          if(track1->IsPoint()) 
            {
index 3407588..2d25602 100644 (file)
@@ -58,10 +58,8 @@ AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent()
   fDoPP(false),
   fMultiplicity(4000),
   fBField(0.4),
-// BEGINN ############################################## MODIFIY JMT
   fnonvertextracking(kFALSE),
   fmainvertextracking(kTRUE),
-// END ################################################# MODIFIY JMT
   fpInterMerger(NULL)
 {
   // see header file for class documentation
@@ -81,10 +79,8 @@ AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent(const AliHLTTPCSl
   fDoPP(false),
   fMultiplicity(4000),
   fBField(0.4),
-// BEGINN ############################################## MODIFIY JMT
   fnonvertextracking(kFALSE),
   fmainvertextracking(kTRUE),
-// END ################################################# MODIFIY JMT
   fpInterMerger(NULL)
 {
   // see header file for class documentation
@@ -158,8 +154,6 @@ void AliHLTTPCSliceTrackerComponent::SetTrackerParam(Int_t phiSegments, Int_t et
     fTracker->SetMaxDca(minPtFit);
     //   fTracker->MainVertexSettings(trackletlength,tracklength,rowscopetracklet,rowscopetrack);
 
-// BEGINN ############################################## MODIFIY JMT
-#if 1
     Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "==============================" );
 
     if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){
@@ -186,17 +180,7 @@ void AliHLTTPCSliceTrackerComponent::SetTrackerParam(Int_t phiSegments, Int_t et
        fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
        Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "NONVERTEXTRACKING" );
     }
-#else
-    fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,vertexConstraints);
-    fTracker->SetTrackletCuts(maxangle,goodDist,vertexConstraints);
     
-    if( vertexConstraints )
-       fTracker->MainVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack, maxphi, maxeta);
-    else
-       fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
-#endif
-// END ################################################# MODIFIY JMT
-
     //fTracker->SetParamDone(true);
     /* Matthias 13.12.2006
      * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
@@ -229,7 +213,7 @@ void AliHLTTPCSliceTrackerComponent::SetTrackerParam( bool doPP, int multiplicit
          SetTrackerParam( 50,        // phi_segments:     Devide the space into phi_segments                                      
                           100,       // ets_segments:     Devide the space into eta_segments                                       
                           3,         // trackletlength:   Number of hits a tracklet has to have                                   
-                          10,         // tracklength:      Number of hits a track has to have                                      
+                          60,         // tracklength:      Number of hits a track has to have                                      
                           6,         // rowscopetracklet: Search range of rows for a tracklet                                     
                           6,         // rowscopetrack:    Search range of rows for a track                                       
                           0,         // min_pt_fit:       Cut for moment fit, use:SetMaxDca(min_pt_fit)                           
@@ -435,46 +419,42 @@ int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
            continue;
            }
 
-// BEGINN ############################################## MODIFIY JMT
        if ( !strcmp( argv[i], "nonvertextracking" ) ){
-           fnonvertextracking = kTRUE;
-           i++;
-           continue;       
+         fnonvertextracking = kTRUE;
+         i++;
+         continue;         
        }
        
        if ( !strcmp( argv[i], "mainvertextrackingoff" ) ){     
-           fmainvertextracking = kFALSE;
-           i++;
-           continue;       
+         fmainvertextracking = kFALSE;
+         i++;
+         continue;         
        }
-
+       
        if ( !strcmp( argv[i], "etarange" ) ){  
-           if ( argc <= i+1 ){
-               Logging( kHLTLogError, "HLT::TPCSliceTracker::DoInit", "Missing Eta range", "Missing Eta-range specifiers." );
-               return ENOTSUP;
-           }
-           fEta[1] = strtod( argv[i+1], &cpErr );
-           if ( *cpErr ){
-               Logging( kHLTLogError, "HLT::TPCSliceTracker::DoInit", "Missing Eta range", "Cannot convert Eta-range specifier '%s'.", argv[i+1] );
-               return EINVAL;
-           }
-   
-           i += 2;
-           continue;
+         if ( argc <= i+1 ){
+           Logging( kHLTLogError, "HLT::TPCSliceTracker::DoInit", "Missing Eta range", "Missing Eta-range specifiers." );
+           return ENOTSUP;
+         }
+         fEta[1] = strtod( argv[i+1], &cpErr );
+         if ( *cpErr ){
+           Logging( kHLTLogError, "HLT::TPCSliceTracker::DoInit", "Missing Eta range", "Cannot convert Eta-range specifier '%s'.", argv[i+1] );
+           return EINVAL;
+         }
+         
+         i += 2;
+         continue;
        }
-// END ################################################# MODIFIY JMT
        Logging(kHLTLogError, "HLT::TPCSliceTracker::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
        return EINVAL;
        }
-// #### -B0-CHANGE-START == JMT
     if (fBField == 0.){
-       // parameter for B=0 T 
-       fDoPP = kTRUE;
-       fnonvertextracking = kTRUE;
-       fmainvertextracking = kFALSE;
+      // parameter for B=0 T 
+      fDoPP = kTRUE;
+      fnonvertextracking = kTRUE;
+      fmainvertextracking = kFALSE;
     }
-// #### -B0-CHANGE-END == JMT
-
+        
     if (bDoMerger)
       fpInterMerger = new AliHLTTPCInterMerger();
 
@@ -674,38 +654,27 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt
        }
 
     outPtr = (AliHLTTPCTrackletData*)(outBPtr);
-// BEGINN ############################################## MODIFIY JMT
-#if 1
-    fTracker->SetPointers();
+
     if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){        
-       Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
-       fTracker->MainVertexTrackingA();
-       fTracker->MainVertexTrackingB();
-       fTracker->FillTracks();
+      Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
+      fTracker->MainVertexTrackingA();
+      fTracker->MainVertexTrackingB();
+      fTracker->FillTracks();
     }
     else if ( fmainvertextracking == kTRUE && fnonvertextracking == kTRUE){    
-       Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
-       fTracker->MainVertexTrackingA();
-       fTracker->MainVertexTrackingB();
-       fTracker->FillTracks(); 
-       Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
-       fTracker->NonVertexTracking();
+      Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
+      fTracker->MainVertexTrackingA();
+      fTracker->MainVertexTrackingB();
+      fTracker->FillTracks();  
+      Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
+      fTracker->NonVertexTracking();
     }
     else if ( fmainvertextracking == kFALSE && fnonvertextracking == kTRUE){
-       Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
-       fTracker->NonVertexTracking();  
-       fTracker->FillTracks(); 
+      Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
+      fTracker->NonVertexTracking();   
+      fTracker->FillTracks();  
     }
-#else
-    fTracker->MainVertexTracking_a();
-    fTracker->MainVertexTracking_b();
-    fTracker->FillTracks();
-    
-    if ( fDoNonVertex )
-       fTracker->NonVertexTracking();//Do a second pass for nonvertex tracks
-#endif
-// END ################################################# MODIFIY JMT
-    
+
     UInt_t ntracks0 =0;
     if(fpInterMerger){
       AliHLTTPCMemHandler memory;
index e9aa595..636fce6 100644 (file)
@@ -116,10 +116,8 @@ private:
   /** magnetic field */
   Double_t fBField;                                                //  see above
 
-// BEGINN ############################################## MODIFIY JMT
   Bool_t fnonvertextracking;   // enable NONVERTEX Tracking
   Bool_t fmainvertextracking;  // enable MAINVERTEX Tracking
-// END ################################################# MODIFIY JMT
 
   /** merger object */
   AliHLTTPCInterMerger *fpInterMerger;                             //! transient
index bbe3133..cc83892 100644 (file)
@@ -201,31 +201,27 @@ void AliHLTTPCTrack::Rotate(Int_t slice,Bool_t tolocal)
 void AliHLTTPCTrack::CalculateHelix()
 {
   // fit assigned clusters to helix
-// #### -B0-CHANGE-START == JMT
-    // for straight line fit
-    if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
-       fRadius = 999999;  //just zero
-
-       SetPhi0(atan2(fFirstPoint[1],fFirstPoint[0]));
-       SetR0(sqrt(fFirstPoint[0]*fFirstPoint[0]+fFirstPoint[1]*fFirstPoint[1]));
-    }
-    // for helix fit
-    else { 
-// #### -B0-UNCHANGED-START == JMT
-       //Calculate Radius, CenterX and CenterY from Psi, X0, Y0
-       fRadius = fPt / (AliHLTTPCTransform::GetBFieldValue());
-       if(fRadius) fKappa = -fQ*1./fRadius;
-       else fRadius = 999999;  //just zero
-       Double_t trackPhi0 = fPsi + fQ * AliHLTTPCTransform::PiHalf();
-       
-       fCenterX = fFirstPoint[0] - fRadius *  cos(trackPhi0);
-       fCenterY = fFirstPoint[1] - fRadius *  sin(trackPhi0);
-       
-       SetPhi0(atan2(fFirstPoint[1],fFirstPoint[0]));
-       SetR0(sqrt(fFirstPoint[0]*fFirstPoint[0]+fFirstPoint[1]*fFirstPoint[1]));
-// #### -B0-UNCHANGED-END == JMT
-    }
-// #### -B0-CHANGE-END == JMT
+  // for straight line fit
+  if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
+    fRadius = 999999;  //just zero
+    
+    SetPhi0(atan2(fFirstPoint[1],fFirstPoint[0]));
+    SetR0(sqrt(fFirstPoint[0]*fFirstPoint[0]+fFirstPoint[1]*fFirstPoint[1]));
+  }
+  // for helix fit
+  else { 
+    //Calculate Radius, CenterX and CenterY from Psi, X0, Y0
+    fRadius = fPt / (AliHLTTPCTransform::GetBFieldValue());
+    if(fRadius) fKappa = -fQ*1./fRadius;
+    else fRadius = 999999;  //just zero
+    Double_t trackPhi0 = fPsi + fQ * AliHLTTPCTransform::PiHalf();
+    
+    fCenterX = fFirstPoint[0] - fRadius *  cos(trackPhi0);
+    fCenterY = fFirstPoint[1] - fRadius *  sin(trackPhi0);
+    
+    SetPhi0(atan2(fFirstPoint[1],fFirstPoint[0]));
+    SetR0(sqrt(fFirstPoint[0]*fFirstPoint[0]+fFirstPoint[1]*fFirstPoint[1]));
+  }
 }
 
 Double_t AliHLTTPCTrack::GetCrossingAngle(Int_t padrow,Int_t slice) 
@@ -276,63 +272,57 @@ Bool_t AliHLTTPCTrack::GetCrossingPoint(Int_t padrow,Float_t *xyz)
   
   Double_t xHit = AliHLTTPCTransform::Row2X(padrow);
 
-// BEGINN ############################################## MODIFIY JMT
 //if (xHit < xyz[0]){
 //    LOG(AliHLTTPCLog::kError,"AliHLTTPCTRACK::GetCrossingPoint","")<< "Track doesn't cross padrow " 
 //                             << padrow <<"(x=" << xHit << "). Smallest x=" << xyz[0] << ENDLOG;
 //      return false;
 //}
-// END ################################################# MODIFIY JMT
 
-// #### -B0-CHANGE-START == JMT
   // for straight line fit
-    if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
-
-       Double_t yHit = GetFirstPointY() + (Double_t) tan( GetPsi() ) * (xHit - GetFirstPointX());   
-       
-       Double_t s = (xHit - GetFirstPointX())*(xHit - GetFirstPointX()) + (yHit - GetFirstPointY())*(yHit - GetFirstPointY()); 
-       
-       Double_t zHit = GetFirstPointZ() + s * GetTgl();
-
-       xyz[0] = xHit;
-       xyz[1] = yHit;
-       xyz[2] = zHit;
-    }
-    // for helix fit
+  if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
+    
+    Double_t yHit = GetFirstPointY() + (Double_t) tan( GetPsi() ) * (xHit - GetFirstPointX());   
+    
+    Double_t s = (xHit - GetFirstPointX())*(xHit - GetFirstPointX()) + (yHit - GetFirstPointY())*(yHit - GetFirstPointY()); 
+    
+    Double_t zHit = GetFirstPointZ() + s * GetTgl();
+    
+    xyz[0] = xHit;
+    xyz[1] = yHit;
+    xyz[2] = zHit;
+  }
+  // for helix fit
     else { 
-// #### -B0-UNCHANGED-START == JMT
-       xyz[0] = xHit;
-       Double_t aa = (xHit - GetCenterX())*(xHit - GetCenterX());
-       Double_t r2 = GetRadius()*GetRadius();
-       if(aa > r2)
-           return false;
-       
-       Double_t aa2 = sqrt(r2 - aa);
-       Double_t y1 = GetCenterY() + aa2;
-       Double_t y2 = GetCenterY() - aa2;
-       xyz[1] = y1;
-       if(fabs(y2) < fabs(y1)) xyz[1] = y2;
-       
-       Double_t yHit = xyz[1];
-       Double_t angle1 = atan2((yHit - GetCenterY()),(xHit - GetCenterX()));
-       if(angle1 < 0) angle1 += 2.*AliHLTTPCTransform::Pi();
-       Double_t angle2 = atan2((GetFirstPointY() - GetCenterY()),(GetFirstPointX() - GetCenterX()));
-       if(angle2 < 0) angle2 += AliHLTTPCTransform::TwoPi();
-       
-       Double_t diffangle = angle1 - angle2;
-       diffangle = fmod(diffangle,AliHLTTPCTransform::TwoPi());
-       if((GetCharge()*diffangle) > 0) diffangle = diffangle - GetCharge()*AliHLTTPCTransform::TwoPi();
-       
-       Double_t stot = fabs(diffangle)*GetRadius();
-       
-       Double_t zHit = GetFirstPointZ() + stot*GetTgl();
-       
-       xyz[2] = zHit;
-// #### -B0-UNCHANGED-END == JMT
+      xyz[0] = xHit;
+      Double_t aa = (xHit - GetCenterX())*(xHit - GetCenterX());
+      Double_t r2 = GetRadius()*GetRadius();
+      if(aa > r2)
+       return false;
+      
+      Double_t aa2 = sqrt(r2 - aa);
+      Double_t y1 = GetCenterY() + aa2;
+      Double_t y2 = GetCenterY() - aa2;
+      xyz[1] = y1;
+      if(fabs(y2) < fabs(y1)) xyz[1] = y2;
+      
+      Double_t yHit = xyz[1];
+      Double_t angle1 = atan2((yHit - GetCenterY()),(xHit - GetCenterX()));
+      if(angle1 < 0) angle1 += 2.*AliHLTTPCTransform::Pi();
+      Double_t angle2 = atan2((GetFirstPointY() - GetCenterY()),(GetFirstPointX() - GetCenterX()));
+      if(angle2 < 0) angle2 += AliHLTTPCTransform::TwoPi();
+      
+      Double_t diffangle = angle1 - angle2;
+      diffangle = fmod(diffangle,AliHLTTPCTransform::TwoPi());
+      if((GetCharge()*diffangle) > 0) diffangle = diffangle - GetCharge()*AliHLTTPCTransform::TwoPi();
+      
+      Double_t stot = fabs(diffangle)*GetRadius();
+      
+      Double_t zHit = GetFirstPointZ() + stot*GetTgl();
+      
+      xyz[2] = zHit;
     }
-// #### -B0-CHANGE-END == JMT
-
-    return true;
+  
+  return true;
 }
 
 Bool_t AliHLTTPCTrack::CalculateReferencePoint(Double_t angle,Double_t radius)
@@ -501,69 +491,65 @@ void AliHLTTPCTrack::UpdateToFirstPoint()
   //However, if you later on want to do more precise local calculations, such
   //as impact parameter, residuals etc, you need to give the track parameters
   //according to the actual fit.
-// #### -B0-CHANGE-START == JMT
-    // for straight line fit
-    if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
-       Double_t xc = GetCenterX() - GetFirstPointX();
-       Double_t yc = GetCenterY() - GetFirstPointY();
-
-       Double_t xn = (Double_t) sin( GetPsi() );
-       Double_t yn = -1. * (Double_t) cos( GetPsi() );
-
-       Double_t d = xc*xn + yc*yn;
-
-       Double_t distx = d * xn;
-       Double_t disty = d * yn;
-
-       Double_t point[2];
-
-       point[0] = distx + GetFirstPointX();
-       point[1] = disty + GetFirstPointY();
-
-       //Update the track parameters
-       SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
-       SetPhi0(atan2(point[1],point[0]));
-       SetFirstPoint(point[0],point[1],GetZ0());
-    }
-    // for helix fit
-    else { 
-// #### -B0-UNCHANGED-START == JMT
-       Double_t xc = GetCenterX() - GetFirstPointX();
-       Double_t yc = GetCenterY() - GetFirstPointY();
-       
-       Double_t distx1 = xc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
-       Double_t disty1 = yc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
-       Double_t distance1 = sqrt(distx1*distx1 + disty1*disty1);
-       
-       Double_t distx2 = xc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
-       Double_t disty2 = yc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
-       Double_t distance2 = sqrt(distx2*distx2 + disty2*disty2);
-       
-       //Choose the closest:
-       Double_t point[2];
-       if(distance1 < distance2)
-       {
-           point[0] = distx1 + GetFirstPointX();
-           point[1] = disty1 + GetFirstPointY();
-       }
-       else
-       {
-           point[0] = distx2 + GetFirstPointX();
-           point[1] = disty2 + GetFirstPointY();
-       }
-
-       Double_t pointpsi = atan2(point[1]-GetCenterY(),point[0]-GetCenterX());
-       pointpsi -= GetCharge()*AliHLTTPCTransform::PiHalf();
-       if(pointpsi < 0) pointpsi += AliHLTTPCTransform::TwoPi();
-       
-       //Update the track parameters
-       SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
-       SetPhi0(atan2(point[1],point[0]));
-       SetFirstPoint(point[0],point[1],GetZ0());
-       SetPsi(pointpsi);
-// #### -B0-UNCHANGED-END == JMT
-    }
-// #### -B0-CHANGE-END == JMT
+  // for straight line fit
+  if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
+    Double_t xc = GetCenterX() - GetFirstPointX();
+    Double_t yc = GetCenterY() - GetFirstPointY();
+    
+    Double_t xn = (Double_t) sin( GetPsi() );
+    Double_t yn = -1. * (Double_t) cos( GetPsi() );
+    
+    Double_t d = xc*xn + yc*yn;
+    
+    Double_t distx = d * xn;
+    Double_t disty = d * yn;
+    
+    Double_t point[2];
+    
+    point[0] = distx + GetFirstPointX();
+    point[1] = disty + GetFirstPointY();
+    
+    //Update the track parameters
+    SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
+    SetPhi0(atan2(point[1],point[0]));
+    SetFirstPoint(point[0],point[1],GetZ0());
+  }
+  // for helix fit
+  else { 
+    Double_t xc = GetCenterX() - GetFirstPointX();
+    Double_t yc = GetCenterY() - GetFirstPointY();
+    
+    Double_t distx1 = xc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
+    Double_t disty1 = yc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
+    Double_t distance1 = sqrt(distx1*distx1 + disty1*disty1);
+    
+    Double_t distx2 = xc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
+    Double_t disty2 = yc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
+    Double_t distance2 = sqrt(distx2*distx2 + disty2*disty2);
+    
+    //Choose the closest:
+    Double_t point[2];
+    if(distance1 < distance2)
+      {
+       point[0] = distx1 + GetFirstPointX();
+       point[1] = disty1 + GetFirstPointY();
+      }
+    else
+      {
+       point[0] = distx2 + GetFirstPointX();
+       point[1] = disty2 + GetFirstPointY();
+      }
+    
+    Double_t pointpsi = atan2(point[1]-GetCenterY(),point[0]-GetCenterX());
+    pointpsi -= GetCharge()*AliHLTTPCTransform::PiHalf();
+    if(pointpsi < 0) pointpsi += AliHLTTPCTransform::TwoPi();
+    
+    //Update the track parameters
+    SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
+    SetPhi0(atan2(point[1],point[0]));
+    SetFirstPoint(point[0],point[1],GetZ0());
+    SetPsi(pointpsi);
+  }
 }
 
 void AliHLTTPCTrack::GetClosestPoint(AliHLTTPCVertex *vertex,Double_t &closestX,Double_t &closestY,Double_t &closestZ)
@@ -613,9 +599,7 @@ void AliHLTTPCTrack::GetClosestPoint(AliHLTTPCVertex *vertex,Double_t &closestX,
 void AliHLTTPCTrack::Print() const
 { 
 //print out parameters of track
-// BEGINN ############################################## MODIFIY JMT
 
-#if 1
  LOG(AliHLTTPCLog::kInformational,"AliHLTTPCTrack::Print","Print values")
     <<"NH="<<fNHits<<" "<<fMCid<<" K="<<fKappa<<" R="<<fRadius<<" Cx="<<fCenterX<<" Cy="<<fCenterY<<" MVT="
     <<fFromMainVertex<<" Row0="<<fRowRange[0]<<" Row1="<<fRowRange[1]<<" Sector="<<fSector<<" Q="<<fQ<<" TgLam="
@@ -625,20 +609,6 @@ void AliHLTTPCTrack::Print() const
     <<fPoint[0]<<" "<<fPoint[1]<<" "<<fPoint[2]<<" "<<fPointPsi<<" "<<fIsPoint<<" local="
     <<fIsLocal<<" "<<fPID<<ENDLOG; 
 
-
-
-#else
-  LOG(AliHLTTPCLog::kInformational,"AliHLTTPCTrack::Print","Print values")
-    <<fNHits<<" "<<fMCid<<" "<<fKappa<<" "<<fRadius<<" "<<fCenterX<<" "<<fCenterY<<" "
-    <<fFromMainVertex<<" "<<fRowRange[0]<<" "<<fRowRange[1]<<" "<<fSector<<" "<<fQ<<" "
-    <<fTanl<<" "<<fPsi<<" "<<fPt<<" "<<fLength<<" "<<fPterr<<" "<<fPsierr<<" "<<fZ0err<<" "
-    <<fTanlerr<<" "<<fPhi0<<" "<<fR0<<" "<<fZ0<<" "<<fFirstPoint[0]<<" "<<fFirstPoint[1]<<" "
-    <<fFirstPoint[2]<<" "<<fLastPoint[0]<<" "<<fLastPoint[1]<<" "<<fLastPoint[2]<<" "
-    <<fPoint[0]<<" "<<fPoint[1]<<" "<<fPoint[2]<<" "<<fPointPsi<<" "<<fIsPoint<<" "
-    <<fIsLocal<<" "<<fPID<<ENDLOG; 
-#endif
-
-// END ################################################# MODIFIY JMT
 }
 
 int AliHLTTPCTrack::Convert2AliKalmanTrack()
index 86992a5..28c8038 100644 (file)
@@ -431,11 +431,9 @@ UInt_t AliHLTTPCTrackArray::WriteTracks(AliHLTTPCTrackSegmentData* tr)
     size += sizeof(AliHLTTPCTrackSegmentData)+tP->fNPoints*sizeof(UInt_t);
     tP = (AliHLTTPCTrackSegmentData*)tmpP;
 
-// BEGINN ############################################## MODIFIY JMT
 //    LOG(AliHLTTPCLog::kError,"AliHLTTPCTrackArray::WriteTracks","TRACKPARAMETER") <<ENDLOG;
 //    track->Rotate(0,kFALSE);
 //    track->Print();
-// END ################################################# MODIFIY JMT
 
   }
   return size;