]>
Commit | Line | Data |
---|---|---|
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 | |
17 | class AliExternalTrackParam; | |
e4042305 | 18 | class AliTPCseed; |
8b3c60d8 | 19 | class TGraphErrors; |
9318a5b4 | 20 | |
e4042305 | 21 | class AliTPCcalibAlign:public AliTPCcalibBase { |
9318a5b4 | 22 | public: |
972cf6f2 | 23 | enum HistoType {kY=0, kZ =1, kPhi=2, kTheta=3}; |
8b3c60d8 | 24 | enum FitType{ k6=0, k9=1, k12}; |
9318a5b4 | 25 | AliTPCcalibAlign(); |
e149f26d | 26 | AliTPCcalibAlign(const Text_t *name, const Text_t *title); |
9318a5b4 | 27 | virtual ~AliTPCcalibAlign(); |
e4042305 | 28 | virtual void Process(AliTPCseed *track); |
7eaa723e | 29 | virtual void Analyze(); |
30 | virtual void Terminate(); | |
ae0ac7be | 31 | virtual Long64_t Merge(TCollection* list); |
7eaa723e | 32 | // |
33 | virtual void EvalFitters(); | |
8b3c60d8 | 34 | TH1 * GetHisto(HistoType type, Int_t s1, Int_t s2, Bool_t force=kFALSE); |
35 | void MakeTree(const char *fname="alignTree.root"); | |
36 | TGraphErrors * MakeGraph(Int_t sec0, Int_t sec1, Int_t dsec, | |
37 | Int_t i0, Int_t i1, FitType type); | |
e4042305 | 38 | void ProcessTracklets(const AliExternalTrackParam &t1, |
39 | const AliExternalTrackParam &t2, | |
967eae0d | 40 | const AliTPCseed * seed, |
e4042305 | 41 | Int_t s1,Int_t s2); |
972cf6f2 | 42 | inline Int_t GetIndex(Int_t s1,Int_t s2){return 72*s1+s2;} |
43 | // | |
44 | inline TLinearFitter* GetFitter12(Int_t s1,Int_t s2); | |
45 | inline TLinearFitter* GetFitter9(Int_t s1,Int_t s2); | |
46 | inline TLinearFitter* GetFitter6(Int_t s1,Int_t s2); | |
47 | // | |
9318a5b4 | 48 | Bool_t GetTransformation12(Int_t s1,Int_t s2,TMatrixD &a); |
49 | Bool_t GetTransformation9(Int_t s1,Int_t s2,TMatrixD &a); | |
50 | Bool_t GetTransformation6(Int_t s1,Int_t s2,TMatrixD &a); | |
967eae0d | 51 | |
52 | void ProcessDiff(const AliExternalTrackParam &t1, | |
53 | const AliExternalTrackParam &t2, | |
54 | const AliTPCseed *seed, | |
55 | Int_t s1,Int_t s2); | |
56 | ||
972cf6f2 | 57 | // Bool_t GetTransformationCovar12(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE); |
58 | // Bool_t GetTransformationCovar9(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE); | |
59 | // Bool_t GetTransformationCovar6(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE); | |
ae0ac7be | 60 | void Add(AliTPCcalibAlign * align); |
108953e9 | 61 | Int_t *GetPoints() {return fPoints;} |
1aa15e8d | 62 | void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);}; |
63 | void Process(AliESDEvent *event){AliTPCcalibBase::Process(event);} | |
9318a5b4 | 64 | private: |
972cf6f2 | 65 | void FillHisto(const AliExternalTrackParam &t1, |
66 | const AliExternalTrackParam &t2, | |
67 | Int_t s1,Int_t s2); | |
9318a5b4 | 68 | |
972cf6f2 | 69 | void Process12(const Double_t *t1, const Double_t *t2, |
70 | TLinearFitter *fitter); | |
71 | void Process9(Double_t *t1, Double_t *t2, TLinearFitter *fitter); | |
72 | void Process6(Double_t *t1, Double_t *t2, TLinearFitter *fitter); | |
73 | TLinearFitter* GetOrMakeFitter12(Int_t s1,Int_t s2); | |
74 | TLinearFitter* GetOrMakeFitter9(Int_t s1,Int_t s2); | |
75 | TLinearFitter* GetOrMakeFitter6(Int_t s1,Int_t s2); | |
76 | TObjArray fDphiHistArray; // array of residual histograms phi | |
77 | TObjArray fDthetaHistArray; // array of residual histograms theta | |
78 | TObjArray fDyHistArray; // array of residual histograms y | |
79 | TObjArray fDzHistArray; // array of residual histograms z | |
80 | TObjArray fFitterArray12; // array of fitters | |
81 | TObjArray fFitterArray9; // array of fitters | |
82 | TObjArray fFitterArray6; // array of fitters | |
83 | Int_t fPoints[72*72]; // number of points in the fitter | |
9318a5b4 | 84 | ClassDef(AliTPCcalibAlign,1) |
85 | }; | |
86 | ||
972cf6f2 | 87 | |
88 | TLinearFitter* AliTPCcalibAlign::GetFitter12(Int_t s1,Int_t s2) { | |
89 | return static_cast<TLinearFitter*>(fFitterArray12[GetIndex(s1,s2)]); | |
90 | } | |
91 | TLinearFitter* AliTPCcalibAlign::GetFitter9(Int_t s1,Int_t s2) { | |
92 | return static_cast<TLinearFitter*>(fFitterArray9[GetIndex(s1,s2)]); | |
93 | } | |
94 | TLinearFitter* AliTPCcalibAlign::GetFitter6(Int_t s1,Int_t s2) { | |
95 | return static_cast<TLinearFitter*>(fFitterArray6[GetIndex(s1,s2)]); | |
96 | } | |
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
9318a5b4 | 102 | #endif |