]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx
added offline wrapper for HLT TPC CA tracker (Sergey)
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAParam.cxx
1 // @(#) $Id$
2 //***************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project          * 
4 // ALICE Experiment at CERN, All rights reserved.                           *
5 //                                                                          *
6 // Primary Authors: Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> *
7 //                  Ivan Kisel <kisel@kip.uni-heidelberg.de>                *
8 //                  for The ALICE HLT Project.                              *
9 //                                                                          *
10 // Permission to use, copy, modify and distribute this software and its     *
11 // documentation strictly for non-commercial purposes is hereby granted     *
12 // without fee, provided that the above copyright notice appears in all     *
13 // copies and that both the copyright notice and this permission notice     *
14 // appear in the supporting documentation. The authors make no claims       *
15 // about the suitability of this software for any purpose. It is            *
16 // provided "as is" without express or implied warranty.                    *
17 //***************************************************************************
18
19 #include "AliHLTTPCCAParam.h"
20 #include "TMath.h"
21
22
23 ClassImp(AliHLTTPCCAParam)
24   
25 AliHLTTPCCAParam::AliHLTTPCCAParam()
26   : fISlice(0),fNRows(63),fAlpha(0.174533), fDAlpha(0.349066),
27     fCosAlpha(0), fSinAlpha(0), fAngleMin(0), fAngleMax(0), fRMin(83.65), fRMax(133.3),
28     fZMin(0.0529937), fZMax(249.778), fErrX(0), fErrY(0), fErrZ(0.228808),fPadPitch(0.4),fBz(-5.), 
29     fYErrorCorrection(0.33), fZErrorCorrection(0.45),
30     fCellConnectionAngleXY(35./180.*TMath::Pi()), 
31     fCellConnectionAngleXZ(35./180.*TMath::Pi()),
32     fMaxTrackMatchDRow(4), fTrackConnectionFactor(3.5), fTrackChiCut(3.5), fTrackChi2Cut(10)
33 {
34   Update();
35 }
36
37 void AliHLTTPCCAParam::Initialize( Int_t iSlice, 
38                                    Int_t nRows, Double_t rowX[],
39                                    Double_t alpha, Double_t dAlpha,
40                                    Double_t rMin, Double_t rMax,
41                                    Double_t zMin, Double_t zMax,
42                                    Double_t padPitch, Double_t zSigma,
43                                    Double_t bz
44                                    )
45 {
46   // initialization 
47   fISlice = iSlice;
48   fAlpha = alpha;
49   fDAlpha = dAlpha;
50   fRMin = rMin;
51   fRMax = rMax;
52   fZMin = zMin;
53   fZMax = zMax;
54   fPadPitch = padPitch;
55   fErrY = 1.; // not in use
56   fErrZ = zSigma;
57   fBz = bz;
58   fNRows = nRows;
59   for( Int_t irow=0; irow<nRows; irow++ ){
60     fRowX[irow] = rowX[irow];
61   }
62
63   Update();
64 }
65
66 void AliHLTTPCCAParam::Update()
67 {
68   // update of calculated values
69   fCosAlpha = TMath::Cos(fAlpha);
70   fSinAlpha = TMath::Sin(fAlpha);
71   fAngleMin = fAlpha - fDAlpha/2.;
72   fAngleMax = fAlpha + fDAlpha/2.;
73   fErrX = fPadPitch/TMath::Sqrt(12.);
74   fTrackChi2Cut = fTrackChiCut * fTrackChiCut;
75 }
76
77 void AliHLTTPCCAParam::Slice2Global( Double_t x, Double_t y,  Double_t z, 
78                                      Double_t *X, Double_t *Y,  Double_t *Z ) const
79 {  
80   // conversion of coorinates sector->global
81   *X = x*fCosAlpha - y*fSinAlpha;
82   *Y = y*fCosAlpha + x*fSinAlpha;
83   *Z = z;
84 }
85  
86 void AliHLTTPCCAParam::Global2Slice( Double_t X, Double_t Y,  Double_t Z, 
87                                      Double_t *x, Double_t *y,  Double_t *z ) const
88 {
89   // conversion of coorinates global->sector
90   *x = X*fCosAlpha + Y*fSinAlpha;
91   *y = Y*fCosAlpha - X*fSinAlpha;
92   *z = Z;
93 }