Bug fix - Teminate - as virtula function
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibAlign.h
CommitLineData
9318a5b4 1#ifndef ALITPCCALIBALIGN_H
2#define ALITPCCALIBALIGN_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////
8////
9////
10
11#include "TObject.h"
12#include "TObjArray.h"
13#include "TLinearFitter.h"
e4042305 14#include "AliTPCcalibBase.h"
15#include "TH1.h"
9318a5b4 16
17class AliExternalTrackParam;
e4042305 18class AliTPCseed;
9318a5b4 19
e4042305 20class AliTPCcalibAlign:public AliTPCcalibBase {
9318a5b4 21public:
22 AliTPCcalibAlign();
e149f26d 23 AliTPCcalibAlign(const Text_t *name, const Text_t *title);
9318a5b4 24
25 virtual ~AliTPCcalibAlign();
26
e4042305 27 virtual void Process(AliTPCseed *track);
7eaa723e 28 virtual void Analyze();
29 virtual void Terminate();
30 //
31 virtual void EvalFitters();
e4042305 32 void ProcessTracklets(const AliExternalTrackParam &t1,
33 const AliExternalTrackParam &t2,
34 Int_t s1,Int_t s2);
7eaa723e 35 inline Int_t GetIndex(Int_t s1,Int_t s2){return s1*72+s2;}
9318a5b4 36 TLinearFitter* GetFitter12(Int_t s1,Int_t s2) {
7eaa723e 37 return static_cast<TLinearFitter*>(fFitterArray12[GetIndex(s1,s2)]);
9318a5b4 38 }
39 TLinearFitter* GetFitter9(Int_t s1,Int_t s2) {
7eaa723e 40 return static_cast<TLinearFitter*>(fFitterArray9[GetIndex(s1,s2)]);
9318a5b4 41 }
42 TLinearFitter* GetFitter6(Int_t s1,Int_t s2) {
7eaa723e 43 return static_cast<TLinearFitter*>(fFitterArray6[GetIndex(s1,s2)]);
9318a5b4 44 }
45 Bool_t GetTransformation12(Int_t s1,Int_t s2,TMatrixD &a);
46 Bool_t GetTransformation9(Int_t s1,Int_t s2,TMatrixD &a);
47 Bool_t GetTransformation6(Int_t s1,Int_t s2,TMatrixD &a);
e4042305 48
49 TObjArray fDphiHistArray;
50 TObjArray fDthetaHistArray;
51 TObjArray fDyHistArray;
52 TObjArray fDzHistArray;
53
9318a5b4 54private:
7eaa723e 55 void Process12(const Double_t *t1,
56 const Double_t *t2,
9318a5b4 57 TLinearFitter *fitter);
58 void Process9(Double_t *t1,
59 Double_t *t2,
60 TLinearFitter *fitter);
61 void Process6(Double_t *t1,
62 Double_t *t2,
63 TLinearFitter *fitter);
64 TLinearFitter* GetOrMakeFitter12(Int_t s1,Int_t s2) {
65 //get or make fitter
66 if (!fFitterArray12[s1*72+s2])
7eaa723e 67 // fFitterArray12[s1*72+s2]=new TLinearFitter(12,"x[0]++x[1]++x[2]++x[3]++x[4]++x[5]++x[6]++x[7]++x[8]++x[9]++x[10]++x[11]");
68 fFitterArray12[s1*72+s2]=new TLinearFitter(13,"hyp12");
9318a5b4 69 return GetFitter12(s1,s2);
70 }
71 TLinearFitter* GetOrMakeFitter9(Int_t s1,Int_t s2) {
72 //get or make fitter
73 if (!fFitterArray9[s1*72+s2])
74 fFitterArray9[s1*72+s2]=new TLinearFitter(9,"x0++x1++x2++x3++x4++x5++x6++x7++x8");
75 return GetFitter9(s1,s2);
76 }
77 TLinearFitter* GetOrMakeFitter6(Int_t s1,Int_t s2) {
78 //get or make fitter
79 if (!fFitterArray6[s1*72+s2])
80 fFitterArray6[s1*72+s2]=new TLinearFitter(6,"x0++x1++x2++x3++x4++x5");
81 return GetFitter6(s1,s2);
82 }
7eaa723e 83 TObjArray fFitterArray12; // array of fitters
84 TObjArray fFitterArray9; // array of fitters
85 TObjArray fFitterArray6; // array of fitters
9318a5b4 86 Int_t fPoints[72*72];
87
88 ClassDef(AliTPCcalibAlign,1)
89};
90
91#endif