]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCcalibAlign.h
Fixing ompilation warnings
[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;
1d82fc56 18class AliExternalComparison;
e4042305 19class AliTPCseed;
8b3c60d8 20class TGraphErrors;
6f387311 21class TTree;
1d82fc56 22class THnSparse;
6f387311 23
9318a5b4 24
e4042305 25class AliTPCcalibAlign:public AliTPCcalibBase {
9318a5b4 26public:
bb6bc8f6 27 enum HistoType {kY=0, kZ =1, kPhi=2, kTheta=3,
28 kYPhi=4, kZTheta=5,
29 kYz=6,kZz=7,kPhiZ=8,kThetaZ=9};
30 enum FitType{ k6=0, k9=1, k12=2};
9318a5b4 31 AliTPCcalibAlign();
e149f26d 32 AliTPCcalibAlign(const Text_t *name, const Text_t *title);
bb6bc8f6 33 AliTPCcalibAlign(const AliTPCcalibAlign &align);
34 //
9318a5b4 35 virtual ~AliTPCcalibAlign();
e4042305 36 virtual void Process(AliTPCseed *track);
7eaa723e 37 virtual void Analyze();
38 virtual void Terminate();
ae0ac7be 39 virtual Long64_t Merge(TCollection* list);
7eaa723e 40 //
41 virtual void EvalFitters();
8b3c60d8 42 TH1 * GetHisto(HistoType type, Int_t s1, Int_t s2, Bool_t force=kFALSE);
43 void MakeTree(const char *fname="alignTree.root");
44 TGraphErrors * MakeGraph(Int_t sec0, Int_t sec1, Int_t dsec,
45 Int_t i0, Int_t i1, FitType type);
e4042305 46 void ProcessTracklets(const AliExternalTrackParam &t1,
47 const AliExternalTrackParam &t2,
967eae0d 48 const AliTPCseed * seed,
e4042305 49 Int_t s1,Int_t s2);
972cf6f2 50 inline Int_t GetIndex(Int_t s1,Int_t s2){return 72*s1+s2;}
51 //
6f387311 52 inline const TMatrixD * GetTransformation(Int_t s1,Int_t s2, Int_t fitType);
53 //
972cf6f2 54 inline TLinearFitter* GetFitter12(Int_t s1,Int_t s2);
55 inline TLinearFitter* GetFitter9(Int_t s1,Int_t s2);
56 inline TLinearFitter* GetFitter6(Int_t s1,Int_t s2);
57 //
9318a5b4 58 Bool_t GetTransformation12(Int_t s1,Int_t s2,TMatrixD &a);
59 Bool_t GetTransformation9(Int_t s1,Int_t s2,TMatrixD &a);
60 Bool_t GetTransformation6(Int_t s1,Int_t s2,TMatrixD &a);
1d82fc56 61 Int_t AcceptTracklet(const AliExternalTrackParam &tp1,
6f387311 62 const AliExternalTrackParam &tp2);
63
967eae0d 64 void ProcessDiff(const AliExternalTrackParam &t1,
65 const AliExternalTrackParam &t2,
66 const AliTPCseed *seed,
67 Int_t s1,Int_t s2);
6f387311 68 void ProcessAlign(Double_t * t1, Double_t * t2, Int_t s1,Int_t s2);
967eae0d 69
972cf6f2 70// Bool_t GetTransformationCovar12(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE);
71// Bool_t GetTransformationCovar9(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE);
72// Bool_t GetTransformationCovar6(Int_t s1,Int_t s2,TMatrixD &a, Bool_t norm=kFALSE);
ae0ac7be 73 void Add(AliTPCcalibAlign * align);
108953e9 74 Int_t *GetPoints() {return fPoints;}
1aa15e8d 75 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
76 void Process(AliESDEvent *event){AliTPCcalibBase::Process(event);}
6f387311 77 TLinearFitter* GetOrMakeFitter12(Int_t s1,Int_t s2);
78 TLinearFitter* GetOrMakeFitter9(Int_t s1,Int_t s2);
79 TLinearFitter* GetOrMakeFitter6(Int_t s1,Int_t s2);
972cf6f2 80 void Process12(const Double_t *t1, const Double_t *t2,
81 TLinearFitter *fitter);
82 void Process9(Double_t *t1, Double_t *t2, TLinearFitter *fitter);
83 void Process6(Double_t *t1, Double_t *t2, TLinearFitter *fitter);
1d82fc56 84 void ProcessTree(TTree * tree, AliExternalComparison *comp=0);
85 void GlobalAlign6(Int_t minPoints, Float_t sysError, Int_t niter);
86 //
87 // Cluster comparison Part
88 //
6f387311 89 //
90 // For visualization and test purposes
91 //
92 Double_t Correct(Int_t type, Int_t value, Int_t s1, Int_t s2, Double_t x, Double_t y, Double_t z, Double_t phi,Double_t theta);
93 static Double_t SCorrect(Int_t type, Int_t value, Int_t s1, Int_t s2, Double_t x, Double_t y, Double_t z, Double_t phi,Double_t theta){return Instance()->Correct(type,value,s1,s2,x,y,z,phi,theta);}
94 static AliTPCcalibAlign* Instance();
95 void SetInstance(AliTPCcalibAlign*param){fgInstance = param;}
1d82fc56 96 static void Constrain1Pt(AliExternalTrackParam &t1, const AliExternalTrackParam &t2, Bool_t noField);
97 void SetNoField(Bool_t noField){ fNoField=noField;}
6f387311 98private:
99
100 void FillHisto(const AliExternalTrackParam &t1,
101 const AliExternalTrackParam &t2,
102 Int_t s1,Int_t s2);
103
bb6bc8f6 104 TObjArray fDphiHistArray; // array of residual histograms phi -kPhi
105 TObjArray fDthetaHistArray; // array of residual histograms theta -kTheta
106 TObjArray fDyHistArray; // array of residual histograms y -kY
107 TObjArray fDzHistArray; // array of residual histograms z -kZ
108 //
109 TObjArray fDyPhiHistArray; // array of residual histograms y -kYPhi
110 TObjArray fDzThetaHistArray; // array of residual histograms z-z -kZTheta
111 //
112 TObjArray fDphiZHistArray; // array of residual histograms phi -kPhiz
113 TObjArray fDthetaZHistArray; // array of residual histograms theta -kThetaz
114 TObjArray fDyZHistArray; // array of residual histograms y -kYz
115 TObjArray fDzZHistArray; // array of residual histograms z -kZz
116 //
117 //
972cf6f2 118 TObjArray fFitterArray12; // array of fitters
119 TObjArray fFitterArray9; // array of fitters
120 TObjArray fFitterArray6; // array of fitters
6f387311 121 //
122 TObjArray fMatrixArray12; // array of transnformtation matrix
123 TObjArray fMatrixArray9; // array of transnformtation matrix
1d82fc56 124 TObjArray fMatrixArray6; // array of transnformtation matrix
125 //
126 //
127 TObjArray fCombinedMatrixArray6; // array combeined transformation matrix
128 //
129 AliExternalComparison *fCompTracklet; //tracklet comparison
6f387311 130 //
131 Int_t fPoints[72*72]; // number of points in the fitter
1d82fc56 132 Bool_t fNoField; // flag - no field data
6f387311 133 static AliTPCcalibAlign* fgInstance; //! Instance of this class (singleton implementation)
1d82fc56 134 ClassDef(AliTPCcalibAlign,2)
9318a5b4 135};
136
972cf6f2 137
138TLinearFitter* AliTPCcalibAlign::GetFitter12(Int_t s1,Int_t s2) {
139 return static_cast<TLinearFitter*>(fFitterArray12[GetIndex(s1,s2)]);
140}
141TLinearFitter* AliTPCcalibAlign::GetFitter9(Int_t s1,Int_t s2) {
142 return static_cast<TLinearFitter*>(fFitterArray9[GetIndex(s1,s2)]);
143}
144TLinearFitter* AliTPCcalibAlign::GetFitter6(Int_t s1,Int_t s2) {
145 return static_cast<TLinearFitter*>(fFitterArray6[GetIndex(s1,s2)]);
146}
147
6f387311 148const TMatrixD * AliTPCcalibAlign::GetTransformation(Int_t s1,Int_t s2, Int_t fitType){
149 if (fitType==0) return static_cast<TMatrixD*>(fMatrixArray6[GetIndex(s1,s2)]);
150 if (fitType==1) return static_cast<TMatrixD*>(fMatrixArray9[GetIndex(s1,s2)]);
151 if (fitType==2) return static_cast<TMatrixD*>(fMatrixArray12[GetIndex(s1,s2)]);
1d82fc56 152 return 0;
6f387311 153}
972cf6f2 154
155
156
9318a5b4 157#endif