From: sgorbuno Date: Fri, 4 Sep 2009 00:22:05 +0000 (+0000) Subject: 1. bug fix: skip the final transport of tracks to the inner TPC X, when the tracks... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=f0fb467d37f410071c54dae6d75d6a66ee8675fa 1. bug fix: skip the final transport of tracks to the inner TPC X, when the tracks are horisontal 2. few tuning parameters are added 3. compilation warnings fixed Extra parameters added --Thi line, and those below, will be ignored-- M HLT/TPCLib/tracking-ca/AliHLTTPCCAStandaloneFramework.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.h M HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.cxx M HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h M HLT/TPCLib/tracking-ca/AliHLTTPCCASliceData.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h M HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h M HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.cxx M HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.h --- diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.cxx index 72b5fde2453..1fb152883c6 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.cxx @@ -418,19 +418,28 @@ void AliHLTTPCCADisplay::Slice2View( double x, double y, double *xv, double *yv *yv = yg * fCos + xg * fSin; } - -void AliHLTTPCCADisplay::DrawSliceHit( int iRow, int iHit, int color, Size_t width ) +void AliHLTTPCCADisplay::SliceHitXYZ(int iRow, int iHit, double &x, double &y, double &z ) { - // draw hit + // get xyz of the hit + if ( !fSlice ) return; const AliHLTTPCCARow &row = fSlice->Row( iRow ); float y0 = row.Grid().YMin(); float z0 = row.Grid().ZMin(); float stepY = row.HstepY(); float stepZ = row.HstepZ(); - float x = row.X(); - float y = y0 + fSlice->HitDataY( row, iHit ) * stepY; - float z = z0 + fSlice->HitDataZ( row, iHit ) * stepZ; + x = row.X(); + y = y0 + fSlice->HitDataY( row, iHit ) * stepY; + z = z0 + fSlice->HitDataZ( row, iHit ) * stepZ; +} + +void AliHLTTPCCADisplay::DrawSliceHit( int iRow, int iHit, int color, Size_t width ) +{ + // draw hit + if ( !fSlice ) return; + + double x,y,z; + SliceHitXYZ( iRow, iHit, x, y, z ); SetSliceTransform( fSlice ); @@ -471,52 +480,49 @@ void AliHLTTPCCADisplay::DrawSliceHits( int color, Size_t width ) } -void AliHLTTPCCADisplay::DrawSliceLink( int /*iRow*/, int /*iHit*/, int /*colorUp*/, int /*colorDn*/, int /*width*/ ) +void AliHLTTPCCADisplay::DrawSliceLink( int iRow, int iHit, int colorUp, int colorDn, int width ) { // draw link between clusters -#ifdef XXX - if ( !fPerf || !fGB ) return; - AliHLTTPCCAGBTracker &tracker = *fGB; + + //if ( !fPerf ) return; + //AliHLTTPCCAGBTracker &tracker = *fGB; if ( width < 0 ) width = 1.; fLine.SetLineWidth( width ); int colUp = colorUp >= 0 ? colorUp : kMagenta; int colDn = colorDn >= 0 ? colorDn : kBlack; if ( iRow < 2 || iRow >= fSlice->Param().NRows() - 2 ) return; - const AliHLTTPCCARow& row = fSlice->Row( iRow ); - const AliHLTTPCCARow& rowUp = fSlice->Row( iRow + 2 ); - const AliHLTTPCCARow& rowDn = fSlice->Row( iRow - 2 ); + const AliHLTTPCCARow& row = fSlice->Data().Row( iRow ); - int id = fSlice->HitInputID( row, iHit ); - const AliHLTTPCCAGBHit &h = tracker.Hits()[tracker.FirstSliceHit()[fSlice->Param().ISlice()] + id]; short iUp = fSlice->HitLinkUpData( row, iHit ); short iDn = fSlice->HitLinkDownData( row, iHit ); + + double p1[3], p2[3], p3[3]; + SliceHitXYZ( iRow, iHit, p1[0],p1[1],p1[2]); + + double vx, vy, vx1, vy1; + Slice2View( p1[0], p1[1], &vx, &vy ); + if ( iUp >= 0 ) { - int id1 = fSlice->HitInputID( rowUp, iUp ); - const AliHLTTPCCAGBHit &h1 = tracker.Hits()[tracker.FirstSliceHit()[fSlice->Param().ISlice()] + id1]; - double vx, vy, vx1, vy1; - Slice2View( h.X(), h.Y(), &vx, &vy ); - Slice2View( h1.X(), h1.Y(), &vx1, &vy1 ); + SliceHitXYZ( iRow+2, iUp, p2[0],p2[1],p2[2]); + Slice2View( p2[0], p2[1], &vx1, &vy1 ); fLine.SetLineColor( colUp ); fYX->cd(); fLine.DrawLine( vx - .1, vy, vx1 - .1, vy1 ); fZX->cd(); - fLine.DrawLine( h.Z() - 1., vy, h1.Z() - 1., vy1 ); + fLine.DrawLine( p1[2] - 1., vy, p2[2] - 1., vy1 ); } - if ( iDn >= 0 ) { - int id1 = fSlice->HitInputID( rowDn, iDn ); - const AliHLTTPCCAGBHit &h1 = tracker.Hits()[tracker.FirstSliceHit()[fSlice->Param().ISlice()] + id1]; - double vx, vy, vx1, vy1; - Slice2View( h.X(), h.Y(), &vx, &vy ); - Slice2View( h1.X(), h1.Y(), &vx1, &vy1 ); + if ( iDn >= 0 ) { + SliceHitXYZ( iRow-2, iDn, p3[0],p3[1],p3[2]); + Slice2View( p3[0], p3[1], &vx1, &vy1 ); fLine.SetLineColor( colDn ); fYX->cd(); fLine.DrawLine( vx + .1, vy, vx1 + .1, vy1 ); fZX->cd(); - fLine.DrawLine( h.Z() + 1., vy, h1.Z() + 1., vy1 ); + fLine.DrawLine( p1[2] + 1., vy, p3[2] + 1., vy1 ); } -#endif + } diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h b/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h index baef7ab0fac..5011e1ce99e 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h @@ -79,6 +79,7 @@ class AliHLTTPCCADisplay void DrawSliceHits( int color = -1, Size_t width = -1 ); void DrawSliceLinks( int colorUp = -1, int colorDn = -1, int width = -1 ); void DrawSliceLink( int iRow, int iHit, int colorUp = -1, int colorDn = -1, int width = -1 ); + void SliceHitXYZ(int iRow, int iHit, double &x, double &y, double &z ); void SetSliceTransform( double alpha ); diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.cxx index 5176a173546..7d7befee93b 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.cxx @@ -59,7 +59,7 @@ ClassImp( AliHLTTPCCAGlobalMergerComponent ) AliHLTTPCCAGlobalMergerComponent::AliHLTTPCCAGlobalMergerComponent() - : fGlobalMerger( 0 ), fSolenoidBz( 0 ) + : fGlobalMerger( 0 ), fSolenoidBz( 0 ), fClusterErrorCorrectionY(0), fClusterErrorCorrectionZ(0) { // see header file for class documentation } @@ -112,6 +112,8 @@ void AliHLTTPCCAGlobalMergerComponent::SetDefaultConfiguration() // Some parameters can be later overwritten from the OCDB fSolenoidBz = 5.; + fClusterErrorCorrectionY = 0; + fClusterErrorCorrectionZ = 1.1; } int AliHLTTPCCAGlobalMergerComponent::ReadConfigurationString( const char* arguments ) @@ -140,6 +142,20 @@ int AliHLTTPCCAGlobalMergerComponent::ReadConfigurationString( const char* argu continue; } + if ( argument.CompareTo( "-errorCorrectionY" ) == 0 ) { + if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break; + fClusterErrorCorrectionY = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof(); + HLTInfo( "Cluster Y error correction factor set to: %f", fClusterErrorCorrectionY ); + continue; + } + + if ( argument.CompareTo( "-errorCorrectionZ" ) == 0 ) { + if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break; + fClusterErrorCorrectionZ = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof(); + HLTInfo( "Cluster Z error correction factor set to: %f", fClusterErrorCorrectionZ ); + continue; + } + HLTError( "Unknown option \"%s\"", argument.Data() ); iResult = -EINVAL; } @@ -248,6 +264,11 @@ int AliHLTTPCCAGlobalMergerComponent::Configure( const char* cdbEntry, const cha param.Initialize( iSec, nRows, rowX, alpha, dalpha, inRmin, outRmax, zMin, zMax, padPitch, sigmaZ, fSolenoidBz ); + + if( fClusterErrorCorrectionY>1.e-4 ) param.SetClusterError2CorrectionY( fClusterErrorCorrectionY*fClusterErrorCorrectionY ); + if( fClusterErrorCorrectionZ>1.e-4 ) param.SetClusterError2CorrectionZ( fClusterErrorCorrectionZ*fClusterErrorCorrectionZ ); + param.Update(); + delete[] rowX; } diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.h b/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.h index 93571e744c6..bb4886472e5 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.h +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAGlobalMergerComponent.h @@ -113,6 +113,8 @@ class AliHLTTPCCAGlobalMergerComponent : public AliHLTProcessor AliHLTTPCCAMerger *fGlobalMerger; //! double fSolenoidBz; // magnetic field + double fClusterErrorCorrectionY; // correction for the cluster error during pre-fit + double fClusterErrorCorrectionZ; // correction for the cluster error during pre-fit ClassDef( AliHLTTPCCAGlobalMergerComponent, 0 ) }; diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.cxx index 102dc668737..40907d72b17 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.cxx @@ -298,7 +298,7 @@ void AliHLTTPCCAMerger::UnpackSlices() bool AliHLTTPCCAMerger::FitTrack( AliHLTTPCCATrackParam &T, float &Alpha, AliHLTTPCCATrackParam t0, float Alpha0, - int hits[], int &NTrackHits, bool dir, + int hits[], int &NTrackHits, bool dir, bool final, AliHLTTPCCAClusterInfo *infoArray ) { // Fit the track @@ -362,6 +362,11 @@ bool AliHLTTPCCAMerger::FitTrack( AliHLTTPCCATrackParam &T, float &Alpha, float err2Y = h.Err2Y(); float err2Z = h.Err2Z(); if ( doErrors ) fSliceParam.GetClusterErrors2( h.IRow(), h.Z(), l.SinPhi(), l.CosPhi(), l.DzDs(), err2Y, err2Z ); + if( !final ){ + err2Y*= fSliceParam.ClusterError2CorrectionY(); + err2Z*= fSliceParam.ClusterError2CorrectionZ(); + } + if ( !t.Filter( h.Y(), h.Z(), err2Y, err2Z ) ) continue; first = 0; @@ -460,6 +465,7 @@ void AliHLTTPCCAMerger::MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABo if ( do0 ) { AliHLTTPCCABorderTrack &b = B[nB]; b.SetX( t0.GetX() ); + if ( t0.TransportToX( x0, fSliceParam.GetBz( t0 ), maxSin ) ) { b.SetOK( 1 ); b.SetTrackID( itr ); @@ -472,6 +478,7 @@ void AliHLTTPCCAMerger::MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABo if ( do1 ) { AliHLTTPCCABorderTrack &b = B[nB]; b.SetX( t1.GetX() ); + if ( t1.TransportToX( x0, fSliceParam.GetBz( t1 ), maxSin ) ) { b.SetOK( 1 ); b.SetTrackID( itr ); @@ -488,12 +495,14 @@ void AliHLTTPCCAMerger::MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABo -void AliHLTTPCCAMerger::SplitBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1, +void AliHLTTPCCAMerger::MergeBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1, int iSlice2, AliHLTTPCCABorderTrack B2[], int N2 ) { - //* split two sets of tracks + //* merge two sets of tracks + //std::cout<<" Merge slices "<= 0 ? 1 : -1; float dk = t2.QPt() - c * t1.QPt(); float s2k = t2.Err2QPt() + t1.Err2QPt(); - + //std::cout<<" check 1.. "< factor2k*s2k ) continue; float chi2ys = GetChi2( t1.Y(), c * t1.SinPhi(), t1.Cov()[0], c * t1.Cov()[3], t1.Cov()[5], t2.Y(), t2.SinPhi(), t2.Cov()[0], t2.Cov()[3], t2.Cov()[5] ); + //std::cout<<" check 2.. "< factor2ys ) continue; + float chi2zt = GetChi2( t1.Z(), c * t1.DzDs(), t1.Cov()[2], c * t1.Cov()[7], t1.Cov()[9], t2.Z(), t2.DzDs(), t2.Cov()[2], t2.Cov()[7], t2.Cov()[9] ); + //std::cout<<" check 3.. "< factor2zt ) continue; lBest2 = b2.NClusters(); @@ -549,6 +561,7 @@ void AliHLTTPCCAMerger::SplitBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B if ( iBest2 < 0 ) continue; + //std::cout<<"Neighbour found for "<= 0 ) continue; - + //std::cout<<"Merged track candidate, nhits "< ymax ) { - if ( p.Rotate( dAlpha ) ) { startAlpha += dAlpha; p.TransportToXWithMaterial( xTPC, fitPar, fSliceParam.GetBz( p ) ); } - } else if ( y < -ymax ) { - if ( p.Rotate( -dAlpha ) ) { startAlpha -= dAlpha; p.TransportToXWithMaterial( xTPC, fitPar, fSliceParam.GetBz( p ) );} - } + double ymax = 2.* xTPC * CAMath::Tan( dAlpha / 2. ); + if ( -ymax <= y && y <= ymax && p.CheckNumericalQuality() ){ + startPoint = p; + } } } - if ( !p.CheckNumericalQuality() ) continue; + if ( !startPoint.CheckNumericalQuality() ) continue; AliHLTTPCCAMergedTrack &mergedTrack = outTracks[nOutTracks]; mergedTrack.SetNClusters( nHits ); diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h b/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h index b5975aa6853..19ecbe1bda8 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAMerger.h @@ -82,6 +82,7 @@ class AliHLTTPCCAMerger bool FitTrack( AliHLTTPCCATrackParam &T, float &Alpha, AliHLTTPCCATrackParam t0, float Alpha0, int hits[], int &NHits, bool dir, + bool final = 0, AliHLTTPCCAClusterInfo *infoArray = 0 ); const AliHLTTPCCAParam &SliceParam() const { return fSliceParam; } @@ -98,7 +99,7 @@ class AliHLTTPCCAMerger class AliHLTTPCCABorderTrack; void MakeBorderTracks( int iSlice, int iBorder, AliHLTTPCCABorderTrack B[], int &nB ); - void SplitBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1, + void MergeBorderTracks( int iSlice1, AliHLTTPCCABorderTrack B1[], int N1, int iSlice2, AliHLTTPCCABorderTrack B2[], int N2 ); diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.cxx index 7a8df2d4165..93fb8eee292 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.cxx @@ -96,7 +96,7 @@ GPUd() void AliHLTTPCCANeighboursFinder::Thread if ( ( s.fIRow <= 1 ) || ( s.fIRow >= s.fNRows - 2 ) ) return; float chi2Cut = 3.*3.*4 * ( s.fUpDx * s.fUpDx + s.fDnDx * s.fDnDx ); - const float kAreaSize = 3; + const float kAreaSize = tracker.Param().NeighboursSearchArea(); //float chi2Cut = 3.*3.*(s.fUpDx*s.fUpDx + s.fDnDx*s.fDnDx ); //SG const int kMaxN = 20; diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx index d7e77a14694..0e0a1768e24 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx @@ -29,7 +29,7 @@ GPUd() AliHLTTPCCAParam::AliHLTTPCCAParam() fCosAlpha( 0 ), fSinAlpha( 0 ), fAngleMin( 0 ), fAngleMax( 0 ), fRMin( 83.65 ), fRMax( 133.3 ), fZMin( 0.0529937 ), fZMax( 249.778 ), fErrX( 0 ), fErrY( 0 ), fErrZ( 0.228808 ), fPadPitch( 0.4 ), fBzkG( 5. ), fConstBz( 5.*0.000299792458 ), fHitPickUpFactor( 1. ), - fMaxTrackMatchDRow( 4 ), fTrackConnectionFactor( 3.5 ), fTrackChiCut( 3.5 ), fTrackChi2Cut( 10 ) + fMaxTrackMatchDRow( 4 ), fNeighboursSearchArea(3.), fTrackConnectionFactor( 3.5 ), fTrackChiCut( 3.5 ), fTrackChi2Cut( 10 ), fClusterError2CorrectionY(1.), fClusterError2CorrectionZ(1.) { // constructor fParamS0Par[0][0][0] = 0.00047013; diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h b/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h index 3d8e3814e3b..0c9ec3da33c 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h @@ -71,11 +71,14 @@ class AliHLTTPCCAParam GPUd() float BzkG() const { return fBzkG;} GPUd() float ConstBz() const { return fConstBz;} + GPUd() float NeighboursSearchArea() const { return fNeighboursSearchArea; } GPUd() float TrackConnectionFactor() const { return fTrackConnectionFactor; } GPUd() float TrackChiCut() const { return fTrackChiCut; } GPUd() float TrackChi2Cut() const { return fTrackChi2Cut; } GPUd() int MaxTrackMatchDRow() const { return fMaxTrackMatchDRow; } GPUd() float HitPickUpFactor() const { return fHitPickUpFactor; } + GPUd() float ClusterError2CorrectionY() const { return fClusterError2CorrectionY; } + GPUd() float ClusterError2CorrectionZ() const { return fClusterError2CorrectionZ; } @@ -96,11 +99,15 @@ class AliHLTTPCCAParam GPUd() void SetErrX( float v ) { fErrX = v;} GPUd() void SetErrY( float v ) { fErrY = v;} GPUd() void SetBzkG( float v ) { fBzkG = v;} + + GPUd() void SetNeighboursSearchArea( float v ) { fNeighboursSearchArea = v;} GPUd() void SetTrackConnectionFactor( float v ) { fTrackConnectionFactor = v;} GPUd() void SetTrackChiCut( float v ) { fTrackChiCut = v; } - GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; } + GPUd() void SetTrackChi2Cut( float v ) { fTrackChi2Cut = v; } GPUd() void SetMaxTrackMatchDRow( int v ) { fMaxTrackMatchDRow = v; } GPUd() void SetHitPickUpFactor( float v ) { fHitPickUpFactor = v; } + GPUd() void SetClusterError2CorrectionY( float v ) { fClusterError2CorrectionY = v; } + GPUd() void SetClusterError2CorrectionZ( float v ) { fClusterError2CorrectionZ = v; } GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const; @@ -138,10 +145,14 @@ class AliHLTTPCCAParam float fHitPickUpFactor;// multiplier for the chi2 window for hit pick up procedure int fMaxTrackMatchDRow;// maximal jump in TPC row for connecting track segments + + float fNeighboursSearchArea; // area in cm for the search of neighbours + float fTrackConnectionFactor; // allowed distance in Chi^2/3.5 for neighbouring tracks float fTrackChiCut; // cut for track Sqrt(Chi2/NDF); float fTrackChi2Cut;// cut for track Chi^2/NDF - + float fClusterError2CorrectionY; // correction for the squared cluster error during tracking + float fClusterError2CorrectionZ; // correction for the squared cluster error during tracking float fRowX[200];// X-coordinate of rows float fParamS0Par[2][3][7]; // cluster error parameterization coeficients float fPolinomialFieldBz[6]; // field coefficients diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCASliceData.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCASliceData.cxx index b6012d0b10a..1045b5a76ac 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCASliceData.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCASliceData.cxx @@ -161,7 +161,7 @@ void AliHLTTPCCASliceData::InitFromClusterData( const AliHLTTPCCAClusterData &da // 1. prepare arrays //////////////////////////////////// - const int numberOfRows = data.LastRow() - data.FirstRow(); + //const int numberOfRows = data.LastRow() - data.FirstRow(); fNumberOfHits = data.NumberOfClusters(); /* TODO Vectorization diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCAStandaloneFramework.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCAStandaloneFramework.cxx index 1edf5d0521f..22ba97b564a 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCAStandaloneFramework.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCAStandaloneFramework.cxx @@ -28,14 +28,14 @@ //If not building GPU Code then build dummy functions to link against #ifndef BUILD_GPU -AliHLTTPCCAGPUTracker::AliHLTTPCCAGPUTracker() : gpuTracker(), DebugLevel(0) {} +AliHLTTPCCAGPUTracker::AliHLTTPCCAGPUTracker() : gpuTracker(),GPUMemory(0), DebugLevel(0), OutFile(0), GPUMemSize(0) {} AliHLTTPCCAGPUTracker::~AliHLTTPCCAGPUTracker() {} int AliHLTTPCCAGPUTracker::InitGPU() {return(0);} //template inline T* AliHLTTPCCAGPUTracker::alignPointer(T* ptr, int alignment) {return(NULL);} //bool AliHLTTPCCAGPUTracker::CUDA_FAILED_MSG(cudaError_t error) {return(true);} //int AliHLTTPCCAGPUTracker::CUDASync() {return(1);} -void AliHLTTPCCAGPUTracker::SetDebugLevel(int dwLevel, std::ostream *NewOutFile) {}; -int AliHLTTPCCAGPUTracker::Reconstruct(AliHLTTPCCATracker* tracker) {return(1);} +void AliHLTTPCCAGPUTracker::SetDebugLevel(int /*dwLevel*/, std::ostream * /*NewOutFile*/) {}; +int AliHLTTPCCAGPUTracker::Reconstruct(AliHLTTPCCATracker* /*tracker*/) {return(1);} int AliHLTTPCCAGPUTracker::ExitGPU() {return(0);} #endif @@ -47,7 +47,7 @@ AliHLTTPCCAStandaloneFramework &AliHLTTPCCAStandaloneFramework::Instance() } AliHLTTPCCAStandaloneFramework::AliHLTTPCCAStandaloneFramework() - : fMerger(), fStatNEvents( 0 ), fUseGPUTracker(false), fGPUDebugLevel(0) + : fMerger(), fGPUTracker(), fStatNEvents( 0 ), fUseGPUTracker(false), fGPUDebugLevel(0) { //* constructor @@ -58,7 +58,7 @@ AliHLTTPCCAStandaloneFramework::AliHLTTPCCAStandaloneFramework() } AliHLTTPCCAStandaloneFramework::AliHLTTPCCAStandaloneFramework( const AliHLTTPCCAStandaloneFramework& ) - : fMerger(), fStatNEvents( 0 ) + : fMerger(), fGPUTracker(), fStatNEvents( 0 ), fUseGPUTracker(false), fGPUDebugLevel(0) { //* dummy } diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx index 6acc920969f..b745fe90447 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx @@ -390,7 +390,8 @@ GPUh() void AliHLTTPCCATracker::Reconstruct() if (CheckEmptySlice()) return; #ifdef DRAW1 - //if( fParam.ISlice()==15){ + //if( fParam.ISlice()==2 || fParam.ISlice()==3) + { AliHLTTPCCADisplay::Instance().ClearView(); AliHLTTPCCADisplay::Instance().SetSliceView(); AliHLTTPCCADisplay::Instance().SetCurrentSlice( this ); @@ -399,7 +400,7 @@ GPUh() void AliHLTTPCCATracker::Reconstruct() AliHLTTPCCADisplay::Instance().DrawSliceHits( kRed, .5 ); AliHLTTPCCADisplay::Instance().Ask(); } - //} + } #endif *fNTracks = 0; @@ -425,7 +426,7 @@ GPUh() void AliHLTTPCCATracker::Reconstruct() #endif -#ifdef DRAW +#ifdef DRAW1 if ( NHitsTotal() > 0 ) { AliHLTTPCCADisplay::Instance().DrawSliceLinks( -1, -1, 1 ); AliHLTTPCCADisplay::Instance().Ask(); @@ -482,18 +483,19 @@ GPUh() void AliHLTTPCCATracker::Reconstruct() #endif -#ifdef DRAW +#ifdef DRAW1 { AliHLTTPCCADisplay &disp = AliHLTTPCCADisplay::Instance(); AliHLTTPCCATracker &slice = *this; std::cout << "N out tracks = " << *slice.NOutTracks() << std::endl; - //disp.Ask(); + AliHLTTPCCADisplay::Instance().SetSliceView(); AliHLTTPCCADisplay::Instance().SetCurrentSlice( this ); AliHLTTPCCADisplay::Instance().DrawSlice( this, 1 ); - disp.DrawSliceHits( -1, .5 ); + disp.DrawSliceHits( kRed, .5 ); + disp.Ask(); for ( int itr = 0; itr < *slice.NOutTracks(); itr++ ) { std::cout << "track N " << itr << ", nhits=" << slice.OutTracks()[itr].NHits() << std::endl; - disp.DrawSliceOutTrack( itr, kBlue ); + disp.DrawSliceOutTrack( itr, kBlue ); //disp.Ask(); //int id = slice.OutTracks()[itr].OrigTrackID(); //AliHLTTPCCATrack &tr = Tracks()[id]; @@ -780,6 +782,8 @@ GPUd() void AliHLTTPCCATracker::GetErrors2( int iRow, float z, float sinPhi, flo // fParam.GetClusterErrors2( iRow, z, sinPhi, cosPhi, DzDs, Err2Y, Err2Z ); + Err2Y*=fParam.ClusterError2CorrectionY(); + Err2Z*=fParam.ClusterError2CorrectionZ(); } GPUd() void AliHLTTPCCATracker::GetErrors2( int iRow, const AliHLTTPCCATrackParam &t, float &Err2Y, float &Err2Z ) const diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx b/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx index 78d85eb6461..451e30840ff 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx @@ -64,6 +64,9 @@ AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent() fSolenoidBz( 0 ), fMinNTrackClusters( 0 ), fClusterZCut( 500. ), + fNeighboursSearchArea( 0 ), + fClusterErrorCorrectionY(0), + fClusterErrorCorrectionZ(0), fFullTime( 0 ), fRecoTime( 0 ), fNEvents( 0 ), @@ -83,6 +86,9 @@ AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent( const AliHLTTPCCATrack fSolenoidBz( 0 ), fMinNTrackClusters( 30 ), fClusterZCut( 500. ), + fNeighboursSearchArea(0), + fClusterErrorCorrectionY(0), + fClusterErrorCorrectionZ(0), fFullTime( 0 ), fRecoTime( 0 ), fNEvents( 0 ), @@ -151,6 +157,9 @@ void AliHLTTPCCATrackerComponent::SetDefaultConfiguration() fSolenoidBz = 5.; fMinNTrackClusters = 0; fClusterZCut = 500.; + fNeighboursSearchArea = 0; + fClusterErrorCorrectionY = 0; + fClusterErrorCorrectionZ = 0; fOutputTRAKSEGS = 0; fFullTime = 0; fRecoTime = 0; @@ -196,8 +205,29 @@ int AliHLTTPCCATrackerComponent::ReadConfigurationString( const char* arguments HLTInfo( "ClusterZCut set to: %f", fClusterZCut ); continue; } + + if ( argument.CompareTo( "-neighboursSearchArea" ) == 0 ) { + if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break; + fNeighboursSearchArea = TMath::Abs( ( ( TObjString* )pTokens->At( i ) )->GetString().Atof() ); + HLTInfo( "NeighboursSearchArea set to: %f", fNeighboursSearchArea ); + continue; + } - if ( argument.CompareTo( "-outputTRAKSEGS" ) == 0 ) { + if ( argument.CompareTo( "-errorCorrectionY" ) == 0 ) { + if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break; + fClusterErrorCorrectionY = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof(); + HLTInfo( "Cluster Y error correction factor set to: %f", fClusterErrorCorrectionY ); + continue; + } + + if ( argument.CompareTo( "-errorCorrectionZ" ) == 0 ) { + if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break; + fClusterErrorCorrectionZ = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof(); + HLTInfo( "Cluster Z error correction factor set to: %f", fClusterErrorCorrectionZ ); + continue; + } + + if ( argument.CompareTo( "-outputTRAKSEGS" ) == 0 ) { fOutputTRAKSEGS = 1; HLTInfo( "The special output type \"TRAKSEGS\" is set" ); continue; @@ -463,6 +493,9 @@ int AliHLTTPCCATrackerComponent::DoEvent param.Initialize( iSec, nRows, rowX, alpha, dalpha, inRmin, outRmax, zMin, zMax, padPitch, sigmaZ, fSolenoidBz ); param.SetHitPickUpFactor( 2 ); + if( fNeighboursSearchArea>0 ) param.SetNeighboursSearchArea( fNeighboursSearchArea ); + if( fClusterErrorCorrectionY>1.e-4 ) param.SetClusterError2CorrectionY( fClusterErrorCorrectionY*fClusterErrorCorrectionY ); + if( fClusterErrorCorrectionZ>1.e-4 ) param.SetClusterError2CorrectionZ( fClusterErrorCorrectionZ*fClusterErrorCorrectionZ ); param.Update(); fTracker->Initialize( param ); delete[] rowX; diff --git a/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.h b/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.h index 52fdbea97c3..bd780bfe8b6 100644 --- a/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.h +++ b/HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.h @@ -81,6 +81,10 @@ class AliHLTTPCCATrackerComponent : public AliHLTProcessor double fSolenoidBz; // see above int fMinNTrackClusters; //* required min number of clusters on the track double fClusterZCut; //* cut on cluster Z position (for noise rejection at the age of TPC) + double fNeighboursSearchArea; //* area in cm for the neighbour search algorithm + double fClusterErrorCorrectionY; // correction for the cluster errors + double fClusterErrorCorrectionZ; // correction for the cluster errors + double fFullTime; //* total time for DoEvent() [s] double fRecoTime; //* total reconstruction time [s] Long_t fNEvents; //* number of reconstructed events diff --git a/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx b/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx index 4a0d669b66c..f4ff3cf0bb5 100644 --- a/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx +++ b/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx @@ -553,7 +553,7 @@ int AliTPCtrackerCA::RefitInward ( AliESDEvent *event ) 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, 0,infos ); if ( ok && nHits > 15 ) { if ( t.TransportToXWithMaterial( xTPC, hlt.Merger().SliceParam().GetBz( t ) ) ) { @@ -613,7 +613,7 @@ int AliTPCtrackerCA::PropagateBack( AliESDEvent *event ) 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, 0, infos ); if ( ok && nHits > 15 ) { AliTPCtrack tt( *esd );