]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx
Updated misalignment macros (Raffaele)
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAParam.cxx
CommitLineData
326c2d4b 1// @(#) $Id$
d54804bf 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//***************************************************************************
326c2d4b 18
19#include "AliHLTTPCCAParam.h"
20#include "TMath.h"
21
22
dc4788ec 23ClassImp(AliHLTTPCCAParam)
d54804bf 24
326c2d4b 25AliHLTTPCCAParam::AliHLTTPCCAParam()
d54804bf 26 : fISlice(0),fNRows(63),fAlpha(0.174533), fDAlpha(0.349066),
326c2d4b 27 fCosAlpha(0), fSinAlpha(0), fAngleMin(0), fAngleMax(0), fRMin(83.65), fRMax(133.3),
d54804bf 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)
326c2d4b 33{
34 Update();
35}
36
d54804bf 37void 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
326c2d4b 44 )
45{
46 // initialization
d54804bf 47 fISlice = iSlice;
48 fAlpha = alpha;
49 fDAlpha = dAlpha;
50 fRMin = rMin;
51 fRMax = rMax;
52 fZMin = zMin;
53 fZMax = zMax;
54 fPadPitch = padPitch;
326c2d4b 55 fErrY = 1.; // not in use
d54804bf 56 fErrZ = zSigma;
57 fBz = bz;
58 fNRows = nRows;
59 for( Int_t irow=0; irow<nRows; irow++ ){
60 fRowX[irow] = rowX[irow];
dc4788ec 61 }
62
326c2d4b 63 Update();
64}
65
66void 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
d54804bf 77void AliHLTTPCCAParam::Slice2Global( Double_t x, Double_t y, Double_t z,
dc4788ec 78 Double_t *X, Double_t *Y, Double_t *Z ) const
326c2d4b 79{
80 // conversion of coorinates sector->global
81 *X = x*fCosAlpha - y*fSinAlpha;
82 *Y = y*fCosAlpha + x*fSinAlpha;
83 *Z = z;
84}
85
d54804bf 86void AliHLTTPCCAParam::Global2Slice( Double_t X, Double_t Y, Double_t Z,
87 Double_t *x, Double_t *y, Double_t *z ) const
326c2d4b 88{
89 // conversion of coorinates global->sector
90 *x = X*fCosAlpha + Y*fSinAlpha;
91 *y = Y*fCosAlpha - X*fSinAlpha;
92 *z = Z;
93}