1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 // Combine cosmic track pairs (upper, lower) and do track fitting
19 // lu@physi.uni-heidelberg.de
25 const Double_t _TPCZMIN = -250;
26 const Double_t _TPCZMAX = 250;
27 const Double_t _TPCINR = 84.8;
28 const Double_t _TPCOUR = 246.6;
31 #ifndef ALITPCCOSMICTRACKFIT_H
32 #define ALITPCCOSMICTRACKFIT_H
38 class AliTPCCosmicTrackfit
41 AliTPCCosmicTrackfit(const Int_t dlev=0, const TString tag="test");
43 ~AliTPCCosmicTrackfit();
45 void SetRow(const Int_t shift, const Int_t step){ fRowStartShift = shift; fRowStep = step; }
46 void SetX(const Double_t xmin, const Double_t xmax){ fXMin = xmin; fXMax = xmax; }
48 Bool_t CombineESDtracks(AliESDtrack * &trk0, AliESDtrack *&trk1);
49 Bool_t CombineTPCseedsFast(AliTPCseed * tpcseeds[], const AliExternalTrackParam * trkpars[]);
50 Bool_t CombineTPCseeds(AliTPCseed * &seed0, AliTPCseed *&seed1);
53 //--------- getters ------------
54 Bool_t IsSwap() const {return fKswap;}
55 Int_t GetStatus()const{return fStatus;}
56 Int_t GetFitNcls()const{return fFitNcls;}
57 Int_t GetMissNcls()const{return fMissNcls;}
58 Double_t GetChi2PerCluster()const{return fPreChi2;}
59 Double_t GetFitLeverArm() const {return fFitLeverArm;}
60 Double_t GetImpactD() const {return fImpactD;}
61 Double_t GetImpactZ() const {return fImpactZ;}
62 Double_t GetLeverArm()const {return fLeverArm;}
63 TVector3 GetInnerClusterUp()const {return fInnerClusterUp;}
64 TVector3 GetInnerClusterLow()const {return fInnerClusterLow;}
66 TVector3 ImpactParameter2D() const;
67 TVector3 ImpactParameter3D() const;
69 Double_t MinPhi()const;
71 const AliExternalTrackParam * GetTrackParamUp() const {return fTrackparUp;}
72 const AliExternalTrackParam * GetTrackParamLow() const {return fTrackparLow;}
73 const AliExternalTrackParam * GetIniTrackParamUp() const {return fIniTrackparUp;}
74 const AliExternalTrackParam * GetIniTrackParamLow() const {return fIniTrackparLow;}
76 AliExternalTrackParam * CopyTrackParamUp() const {return new AliExternalTrackParam(*fTrackparUp);}
77 AliExternalTrackParam * CopyTrackParamLow() const {return new AliExternalTrackParam(*fTrackparLow);}
78 AliExternalTrackParam * CopyIniTrackParamUp() const {return new AliExternalTrackParam(*fIniTrackparUp);}
79 AliExternalTrackParam * CopyIniTrackParamLow() const {return new AliExternalTrackParam(*fIniTrackparLow);}
81 AliTPCseed * GetTPCseedUp() const {return fSeedUp;}
82 AliTPCseed * GetTPCseedLow() const {return fSeedLow;}
84 TTreeSRedirector * GetStreamer() const {return fStreamer;}
98 AliTPCCosmicTrackfit(const AliTPCCosmicTrackfit & p);
99 AliTPCCosmicTrackfit & operator=(const AliTPCCosmicTrackfit & p);
101 static Double_t CutLeverArm(){ return 350;} //minimum lever arm 350 ~ 250 * sqrt(2)
102 static Double_t MaxChi2(){ return 10;} //max. chi2/ncls
104 void IniCombineESDtracks();
105 Bool_t GetTPCseeds(const AliESDtrack *trk0, const AliESDtrack *trk1);
107 Bool_t CheckLeverArm();
110 void CombineTPCseeds();
113 TTreeSRedirector *fStreamer; //!debug streamer
114 Int_t fDebugLevel; //debug level
116 AliTPCseed * fSeedUp; //TPC seed of upper track
117 AliTPCseed * fSeedLow; //TPC seed of lower track
118 AliExternalTrackParam * fTrackparUp; //track param of upper track
119 AliExternalTrackParam * fTrackparLow; //track param of lower track
120 AliExternalTrackParam * fIniTrackparUp; //track param of upper track by MakeSeed
121 AliExternalTrackParam * fIniTrackparLow; //track param of lower track by MakeSeed
123 Int_t fStatus; //status for CombineESDtracks/CombineTPCseeds: 0-successful, otherwise fail
124 Bool_t fKswap; //true if should be / already be swapped
126 TVector3 fInnerClusterUp; //xyz of the inner most TPC trackpoint of the Upper track
127 TVector3 fInnerClusterLow; //xyz of the inner most TPC trackpoint of the Lower track
128 Double_t fLeverArm; //transverse difference between upper most and lower most clusters
130 Int_t fFitNcls; //number of TPC clusters successful in propagation (mean of the two propagation: upwards and downwards)
131 Int_t fMissNcls; //number of TPC clusters fail in propagation (sum of the two propagation)
132 Double_t fPreChi2; //Predicted chi2/nfit over the two propagation
133 Double_t fFitLeverArm; //Lever arm calculated from clusters in fitkernel
134 Double_t fImpactD; //2d impact parameter
135 Double_t fImpactZ; //z of impact parameter
137 Int_t fRowStartShift; //row start shift
138 Int_t fRowStep; //row step
139 Double_t fXMin; //cluster X min
140 Double_t fXMax; //cluster X max