]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/TPCrec/AliTPCCosmicTrackfit.h
doxy: all TPC/Base converted
[u/mrichter/AliRoot.git] / TPC / TPCrec / AliTPCCosmicTrackfit.h
CommitLineData
15d37333 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15//
16// Combine cosmic track pairs (upper, lower) and do track fitting
17//
18// Xianguo Lu
19// lu@physi.uni-heidelberg.de
20// Xianguo.Lu@cern.ch
21
22//
23/*
24//in [cm]
25const Double_t _TPCZMIN = -250;
26const Double_t _TPCZMAX = 250;
27const Double_t _TPCINR = 84.8;
28const Double_t _TPCOUR = 246.6;
29*/
30
3aa6a136 31#ifndef ALITPCCOSMICTRACKFIT_H
32#define ALITPCCOSMICTRACKFIT_H
15d37333 33
3aa6a136 34#ifndef TVECTOR3_H
35#include "TVector3.h"
36#endif
15d37333 37
73ba6874 38class AliTPCseed;
39
15d37333 40class AliTPCCosmicTrackfit
41{
42 public:
43 AliTPCCosmicTrackfit(const Int_t dlev=0, const TString tag="test");
44
45 ~AliTPCCosmicTrackfit();
46
47 void SetRow(const Int_t shift, const Int_t step){ fRowStartShift = shift; fRowStep = step; }
48 void SetX(const Double_t xmin, const Double_t xmax){ fXMin = xmin; fXMax = xmax; }
49
50 Bool_t CombineESDtracks(AliESDtrack * &trk0, AliESDtrack *&trk1);
51 Bool_t CombineTPCseedsFast(AliTPCseed * tpcseeds[], const AliExternalTrackParam * trkpars[]);
52 Bool_t CombineTPCseeds(AliTPCseed * &seed0, AliTPCseed *&seed1);
53 void Print() const ;
54
55 //--------- getters ------------
56 Bool_t IsSwap() const {return fKswap;}
57 Int_t GetStatus()const{return fStatus;}
58 Int_t GetFitNcls()const{return fFitNcls;}
59 Int_t GetMissNcls()const{return fMissNcls;}
60 Double_t GetChi2PerCluster()const{return fPreChi2;}
61 Double_t GetFitLeverArm() const {return fFitLeverArm;}
62 Double_t GetImpactD() const {return fImpactD;}
63 Double_t GetImpactZ() const {return fImpactZ;}
64 Double_t GetLeverArm()const {return fLeverArm;}
65 TVector3 GetInnerClusterUp()const {return fInnerClusterUp;}
66 TVector3 GetInnerClusterLow()const {return fInnerClusterLow;}
3aa6a136 67
68 TVector3 ImpactParameter2D() const;
69 TVector3 ImpactParameter3D() const;
70
15d37333 71 Double_t MinPhi()const;
72
73 const AliExternalTrackParam * GetTrackParamUp() const {return fTrackparUp;}
74 const AliExternalTrackParam * GetTrackParamLow() const {return fTrackparLow;}
75 const AliExternalTrackParam * GetIniTrackParamUp() const {return fIniTrackparUp;}
76 const AliExternalTrackParam * GetIniTrackParamLow() const {return fIniTrackparLow;}
77
78 AliExternalTrackParam * CopyTrackParamUp() const {return new AliExternalTrackParam(*fTrackparUp);}
79 AliExternalTrackParam * CopyTrackParamLow() const {return new AliExternalTrackParam(*fTrackparLow);}
80 AliExternalTrackParam * CopyIniTrackParamUp() const {return new AliExternalTrackParam(*fIniTrackparUp);}
81 AliExternalTrackParam * CopyIniTrackParamLow() const {return new AliExternalTrackParam(*fIniTrackparLow);}
82
83 AliTPCseed * GetTPCseedUp() const {return fSeedUp;}
84 AliTPCseed * GetTPCseedLow() const {return fSeedLow;}
85
86 TTreeSRedirector * GetStreamer() const {return fStreamer;}
87
88 private:
89 enum CombineStatus{
90 kFailGetTPCseeds=1,
91 kFailNclsMin =2,
92 kFailSwapSeeds =3,
93 kFailLeverArm =4,
94 kFailMakeSeed =5,
95 kFailPropagation=6,
96 kFailChi2 =7,
97 kFailImpact =8
98 };
99
100 AliTPCCosmicTrackfit(const AliTPCCosmicTrackfit & p);
101 AliTPCCosmicTrackfit & operator=(const AliTPCCosmicTrackfit & p);
102
3aa6a136 103 static Double_t CutLeverArm(){ return 350;} //minimum lever arm 350 ~ 250 * sqrt(2)
104 static Double_t MaxChi2(){ return 10;} //max. chi2/ncls
105
15d37333 106 void IniCombineESDtracks();
107 Bool_t GetTPCseeds(const AliESDtrack *trk0, const AliESDtrack *trk1);
108 Bool_t CheckNcls();
109 Bool_t CheckLeverArm();
110 Bool_t AnaSeeds();
111
112 void CombineTPCseeds();
113 void Update();
114
115 TTreeSRedirector *fStreamer; //!debug streamer
116 Int_t fDebugLevel; //debug level
117
118 AliTPCseed * fSeedUp; //TPC seed of upper track
119 AliTPCseed * fSeedLow; //TPC seed of lower track
120 AliExternalTrackParam * fTrackparUp; //track param of upper track
121 AliExternalTrackParam * fTrackparLow; //track param of lower track
122 AliExternalTrackParam * fIniTrackparUp; //track param of upper track by MakeSeed
123 AliExternalTrackParam * fIniTrackparLow; //track param of lower track by MakeSeed
124
125 Int_t fStatus; //status for CombineESDtracks/CombineTPCseeds: 0-successful, otherwise fail
126 Bool_t fKswap; //true if should be / already be swapped
127
128 TVector3 fInnerClusterUp; //xyz of the inner most TPC trackpoint of the Upper track
129 TVector3 fInnerClusterLow; //xyz of the inner most TPC trackpoint of the Lower track
130 Double_t fLeverArm; //transverse difference between upper most and lower most clusters
131
132 Int_t fFitNcls; //number of TPC clusters successful in propagation (mean of the two propagation: upwards and downwards)
133 Int_t fMissNcls; //number of TPC clusters fail in propagation (sum of the two propagation)
134 Double_t fPreChi2; //Predicted chi2/nfit over the two propagation
135 Double_t fFitLeverArm; //Lever arm calculated from clusters in fitkernel
136 Double_t fImpactD; //2d impact parameter
137 Double_t fImpactZ; //z of impact parameter
138
139 Int_t fRowStartShift; //row start shift
140 Int_t fRowStep; //row step
141 Double_t fXMin; //cluster X min
142 Double_t fXMax; //cluster X max
15d37333 143};
144
145#endif