- void Process9(Double_t *t1,
- Double_t *t2,
- TLinearFitter *fitter);
- void Process6(Double_t *t1,
- Double_t *t2,
- TLinearFitter *fitter);
- TLinearFitter* GetOrMakeFitter12(Int_t s1,Int_t s2) {
- //get or make fitter
- if (!fFitterArray12[s1*72+s2])
- fFitterArray12[s1*72+s2]=new TLinearFitter(12,"x0++x1++x2++x3++x4++x5++x6++x7++x8++x9++x10++x11");
- return GetFitter12(s1,s2);
- }
- TLinearFitter* GetOrMakeFitter9(Int_t s1,Int_t s2) {
- //get or make fitter
- if (!fFitterArray9[s1*72+s2])
- fFitterArray9[s1*72+s2]=new TLinearFitter(9,"x0++x1++x2++x3++x4++x5++x6++x7++x8");
- return GetFitter9(s1,s2);
- }
- TLinearFitter* GetOrMakeFitter6(Int_t s1,Int_t s2) {
- //get or make fitter
- if (!fFitterArray6[s1*72+s2])
- fFitterArray6[s1*72+s2]=new TLinearFitter(6,"x0++x1++x2++x3++x4++x5");
- return GetFitter6(s1,s2);
- }
- TObjArray fFitterArray12;
- TObjArray fFitterArray9;
- TObjArray fFitterArray6;
- Int_t fPoints[72*72];
-
- ClassDef(AliTPCcalibAlign,1)
+ void Process9(Double_t *t1, Double_t *t2, TLinearFitter *fitter);
+ void Process6(Double_t *t1, Double_t *t2, TLinearFitter *fitter);
+ void ProcessTree(TTree * tree, AliExternalComparison *comp=0);
+ void GlobalAlign6(Int_t minPoints, Float_t sysError, Int_t niter);
+ //
+ // Cluster comparison Part
+ //
+ //
+ // For visualization and test purposes
+ //
+ 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);
+ 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);}
+ static AliTPCcalibAlign* Instance();
+ void SetInstance(AliTPCcalibAlign*param){fgInstance = param;}
+ static void Constrain1Pt(AliExternalTrackParam &t1, const AliExternalTrackParam &t2, Bool_t noField);
+ void SetNoField(Bool_t noField){ fNoField=noField;}
+
+ //
+ // Kalman fileter for sectors
+ //
+ void MakeSectorKalman();
+ void UpdateSectorKalman(Int_t sector, Int_t quadrant0, Int_t quadrant1, TMatrixD *p0, TMatrixD *c0, TMatrixD *p1, TMatrixD *c1);
+ void UpdateSectorKalman(TMatrixD &par0, TMatrixD &cov0, TMatrixD ¶1, TMatrixD &cov1);
+ Double_t GetCorrectionSector(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz);
+ static Double_t SGetCorrectionSector(Int_t coord, Int_t sector, Double_t lx, Double_t ly, Double_t lz);
+
+ //
+ // Kalman filter for full TPC
+ //
+ void MakeKalman();
+ void UpdateKalman(Int_t sector0, Int_t sector1, TMatrixD &p0, TMatrixD &c0, TMatrixD &p1, TMatrixD &c1);
+ void UpdateKalman(TMatrixD &par0, TMatrixD &cov0, TMatrixD ¶1, TMatrixD &cov1);
+ //
+ //private:
+ static Int_t CheckCovariance(TMatrixD &covar);
+public:
+
+ void FillHisto(const Double_t *t1,
+ const Double_t *t2,
+ Int_t s1,Int_t s2);
+
+ TObjArray fDphiHistArray; // array of residual histograms phi -kPhi
+ TObjArray fDthetaHistArray; // array of residual histograms theta -kTheta
+ TObjArray fDyHistArray; // array of residual histograms y -kY
+ TObjArray fDzHistArray; // array of residual histograms z -kZ
+ //
+ TObjArray fDyPhiHistArray; // array of residual histograms y -kYPhi
+ TObjArray fDzThetaHistArray; // array of residual histograms z-z -kZTheta
+ //
+ TObjArray fDphiZHistArray; // array of residual histograms phi -kPhiz
+ TObjArray fDthetaZHistArray; // array of residual histograms theta -kThetaz
+ TObjArray fDyZHistArray; // array of residual histograms y -kYz
+ TObjArray fDzZHistArray; // array of residual histograms z -kZz
+ //
+ //
+ TObjArray fFitterArray12; // array of fitters
+ TObjArray fFitterArray9; // array of fitters
+ TObjArray fFitterArray6; // array of fitters
+ //
+ TObjArray fMatrixArray12; // array of transnformtation matrix
+ TObjArray fMatrixArray9; // array of transnformtation matrix
+ TObjArray fMatrixArray6; // array of transnformtation matrix
+ //
+ //
+ TObjArray fCombinedMatrixArray6; // array combeined transformation matrix
+ //
+ AliExternalComparison *fCompTracklet; //tracklet comparison
+ //
+ Int_t fPoints[72*72]; // number of points in the fitter
+ Bool_t fNoField; // flag - no field data
+ // refernce x
+ Double_t fXIO; // OROC-IROC boundary
+ Double_t fXmiddle; // center of the TPC sector local X
+ Double_t fXquadrant; // x quadrant
+ //
+ // Kalman filter for sector internal alignemnt
+ //
+ TObjArray fArraySectorIntParam; // array of sector alignment parameters
+ TObjArray fArraySectorIntCovar; // array of sector alignment covariances
+ //
+ // Kalman filter for global alignment
+ //
+ TMatrixD *fSectorParamA; // Kalman parameter for A side
+ TMatrixD *fSectorCovarA; // Kalman covariance for A side
+ TMatrixD *fSectorParamC; // Kalman parameter for A side
+ TMatrixD *fSectorCovarC; // Kalman covariance for A side
+
+
+ static AliTPCcalibAlign* fgInstance; //! Instance of this class (singleton implementation)
+private:
+ AliTPCcalibAlign& operator=(const AliTPCcalibAlign&);// not implemented
+
+ ClassDef(AliTPCcalibAlign,2)