]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCosmicTrackfit.h
bugfix #83123: registration of configurations in multiple handlers. The bug caused...
[u/mrichter/AliRoot.git] / TPC / 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
31#ifndef ALITPCCOMBINEDTRACKFIT_H
32#define ALITPCCOMBINEDTRACKFIT_H
33
34class TTreeSRedirector;
35
36class AliTPCCosmicTrackfit
37{
38 public:
39 AliTPCCosmicTrackfit(const Int_t dlev=0, const TString tag="test");
40
41 ~AliTPCCosmicTrackfit();
42
43 void SetRow(const Int_t shift, const Int_t step){ fRowStartShift = shift; fRowStep = step; }
44 void SetX(const Double_t xmin, const Double_t xmax){ fXMin = xmin; fXMax = xmax; }
45
46 Bool_t CombineESDtracks(AliESDtrack * &trk0, AliESDtrack *&trk1);
47 Bool_t CombineTPCseedsFast(AliTPCseed * tpcseeds[], const AliExternalTrackParam * trkpars[]);
48 Bool_t CombineTPCseeds(AliTPCseed * &seed0, AliTPCseed *&seed1);
49 void Print() const ;
50
51 //--------- getters ------------
52 Bool_t IsSwap() const {return fKswap;}
53 Int_t GetStatus()const{return fStatus;}
54 Int_t GetFitNcls()const{return fFitNcls;}
55 Int_t GetMissNcls()const{return fMissNcls;}
56 Double_t GetChi2PerCluster()const{return fPreChi2;}
57 Double_t GetFitLeverArm() const {return fFitLeverArm;}
58 Double_t GetImpactD() const {return fImpactD;}
59 Double_t GetImpactZ() const {return fImpactZ;}
60 Double_t GetLeverArm()const {return fLeverArm;}
61 TVector3 GetInnerClusterUp()const {return fInnerClusterUp;}
62 TVector3 GetInnerClusterLow()const {return fInnerClusterLow;}
63 /*
64 Double_t ImpactParameter2D() const;
65 Double_t ImpactParameter3D() const;
66 */
67 Double_t MinPhi()const;
68
69 const AliExternalTrackParam * GetTrackParamUp() const {return fTrackparUp;}
70 const AliExternalTrackParam * GetTrackParamLow() const {return fTrackparLow;}
71 const AliExternalTrackParam * GetIniTrackParamUp() const {return fIniTrackparUp;}
72 const AliExternalTrackParam * GetIniTrackParamLow() const {return fIniTrackparLow;}
73
74 AliExternalTrackParam * CopyTrackParamUp() const {return new AliExternalTrackParam(*fTrackparUp);}
75 AliExternalTrackParam * CopyTrackParamLow() const {return new AliExternalTrackParam(*fTrackparLow);}
76 AliExternalTrackParam * CopyIniTrackParamUp() const {return new AliExternalTrackParam(*fIniTrackparUp);}
77 AliExternalTrackParam * CopyIniTrackParamLow() const {return new AliExternalTrackParam(*fIniTrackparLow);}
78
79 AliTPCseed * GetTPCseedUp() const {return fSeedUp;}
80 AliTPCseed * GetTPCseedLow() const {return fSeedLow;}
81
82 TTreeSRedirector * GetStreamer() const {return fStreamer;}
83
84 private:
85 enum CombineStatus{
86 kFailGetTPCseeds=1,
87 kFailNclsMin =2,
88 kFailSwapSeeds =3,
89 kFailLeverArm =4,
90 kFailMakeSeed =5,
91 kFailPropagation=6,
92 kFailChi2 =7,
93 kFailImpact =8
94 };
95
96 AliTPCCosmicTrackfit(const AliTPCCosmicTrackfit & p);
97 AliTPCCosmicTrackfit & operator=(const AliTPCCosmicTrackfit & p);
98
99 void IniCombineESDtracks();
100 Bool_t GetTPCseeds(const AliESDtrack *trk0, const AliESDtrack *trk1);
101 Bool_t CheckNcls();
102 Bool_t CheckLeverArm();
103 Bool_t AnaSeeds();
104
105 void CombineTPCseeds();
106 void Update();
107
108 TTreeSRedirector *fStreamer; //!debug streamer
109 Int_t fDebugLevel; //debug level
110
111 AliTPCseed * fSeedUp; //TPC seed of upper track
112 AliTPCseed * fSeedLow; //TPC seed of lower track
113 AliExternalTrackParam * fTrackparUp; //track param of upper track
114 AliExternalTrackParam * fTrackparLow; //track param of lower track
115 AliExternalTrackParam * fIniTrackparUp; //track param of upper track by MakeSeed
116 AliExternalTrackParam * fIniTrackparLow; //track param of lower track by MakeSeed
117
118 Int_t fStatus; //status for CombineESDtracks/CombineTPCseeds: 0-successful, otherwise fail
119 Bool_t fKswap; //true if should be / already be swapped
120
121 TVector3 fInnerClusterUp; //xyz of the inner most TPC trackpoint of the Upper track
122 TVector3 fInnerClusterLow; //xyz of the inner most TPC trackpoint of the Lower track
123 Double_t fLeverArm; //transverse difference between upper most and lower most clusters
124
125 Int_t fFitNcls; //number of TPC clusters successful in propagation (mean of the two propagation: upwards and downwards)
126 Int_t fMissNcls; //number of TPC clusters fail in propagation (sum of the two propagation)
127 Double_t fPreChi2; //Predicted chi2/nfit over the two propagation
128 Double_t fFitLeverArm; //Lever arm calculated from clusters in fitkernel
129 Double_t fImpactD; //2d impact parameter
130 Double_t fImpactZ; //z of impact parameter
131
132 Int_t fRowStartShift; //row start shift
133 Int_t fRowStep; //row step
134 Double_t fXMin; //cluster X min
135 Double_t fXMax; //cluster X max
136 static const Double_t fgkCutLeverArm = 350; //minimum lever arm 350 ~ 250 * sqrt(2)
137 static const Double_t fgkMaxChi2 = 10; //max. chi2/ncls
138};
139
140#endif