]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCosmicUtils.h
Adding first version of class for the TPC correction fit.
[u/mrichter/AliRoot.git] / TPC / AliTPCCosmicUtils.h
CommitLineData
1f30d65c 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//
15d37333 16// Static function member which can be used in standalone cases
17// especially as utils for AliTPCCosmicTrackfit
18//
19// detailed description can be found inside individual function
1f30d65c 20//
21// grep "exitreport" in output log to check abnormal termination
22//
15d37333 23// Xianguo Lu
24// lu@physi.uni-heidelberg.de
25// Xianguo.Lu@cern.ch
1f30d65c 26//
27
28#ifndef ALITPCCOSMICUTILS_H
29#define ALITPCCOSMICUTILS_H
30
3aa6a136 31class TVector3;
32
33class AliESDfriend;
34
1f30d65c 35class AliTPCCosmicUtils
36{
37 public:
3aa6a136 38 enum{
39 k0OB0=1,
40 k0OB1=2,
41 k0HWU=4,
42 kTRDCO2=8,
43 kAMU=16,
44 kSCO=32
45 };
46
47 static Double_t GetMinPhi(const AliExternalTrackParam *params[]);
48 static Int_t GetBField(const AliESDEvent *esd);
49 static Int_t GetTrigger(const AliESDEvent *esd);
1f30d65c 50 static AliTPCseed * GetTPCseed(const AliESDtrack *esdtrack);
3aa6a136 51 static Bool_t GetESD(AliESDEvent *& esdevent, AliESDfriend *& esdfriend);
52 //===========================
53
1f30d65c 54 static AliExternalTrackParam *MakeSeed(const AliTPCseed *tseed);
55
15d37333 56 static void SingleFit(AliExternalTrackParam * trackInOld, AliExternalTrackParam * trackOutOld, const AliTPCseed *tseed, const Bool_t kinward, const Int_t rowstartshift, const Int_t rowstep, const Double_t xmin, const Double_t xmax, Int_t &nfit, Int_t &nmiss, Double_t &pchi2, Double_t &lfit, TTreeSRedirector *debugstreamer=0x0);
1f30d65c 57
3aa6a136 58 static void CombinedFit(AliExternalTrackParam *trackPars[], const AliTPCseed *seeds[], const Int_t rowstartshift, const Int_t rowstep, const Double_t xmin, const Double_t xmax, Int_t &nfit, Int_t &nmiss, Double_t &pchi2, Double_t &lfit, Double_t &vtxD, Double_t &vtxZ, TTreeSRedirector *debugstreamer=0x0);
1f30d65c 59
15d37333 60 static void DrawTracks(AliESDtrack *esdtrks[], const TString tag, const TString outputformat="png");
1f30d65c 61 static void DrawSeeds(const AliTPCseed * seeds[], const TString tag, const TString outputformat="png");
62 static void PrintTrackParam(const Int_t id, const AliExternalTrackParam * trackpar, const char *tag="");
15d37333 63 static Bool_t RotateSafe(AliExternalTrackParam *trackPar, const Double_t aa);
64 static Double_t AngleInRange(Double_t phi);
3aa6a136 65 static Double_t Point2LineDist(const TVector3 p0, const TVector3 l1, const TVector3 l2, TVector3 *vtx = 0x0);
66
67 static Int_t NRow(){ return 159;} //number of pad rows
68 static Int_t NclsMin(){ return 40;} //minimum requirement of number of TPC cluster
69 static Double_t Mass(){ return 0.105658;} //muon mass
70
71 //---------------------------
1f30d65c 72
73 private:
3aa6a136 74
75 static Int_t XMin(){ return 80;} //minimum x (tracking system) to use in propagation
76 static Int_t Niter(){ return 2;} //number of iteration in SingleFit and CombinedFit, 1 is not enough, 3 is the same as 2
77
1f30d65c 78 static void IniCov(AliExternalTrackParam *trackPar, const Double_t ncl);
3aa6a136 79 static void SubCombined(AliExternalTrackParam *trackPar, const AliTPCseed *seeds[], const Int_t tk0, const Int_t tk1, const Int_t rowstartshift, const Int_t rowstep, const Double_t xmin, const Double_t xmax, const Double_t eloss, Int_t &nfit, Int_t &nmiss, Double_t &pchi2, Double_t &lfit, Double_t &vtxD, Double_t &vtxZ, TTreeSRedirector *debugstreamer=0x0);
1f30d65c 80
3aa6a136 81 static void FitKernel(AliExternalTrackParam *trackPar, const AliTPCseed *tseed, const Int_t rowstart, const Int_t rowstop, const Int_t drow, const Double_t xmin, const Double_t xmax, const Double_t eloss, Int_t &ksite, Int_t &nfit, Int_t &nmiss, Double_t &pchi2, TVector3 &gposStart, TVector3 &gposStop, TTreeSRedirector *debugstreamer, const Bool_t kinicov);
1f30d65c 82};
83
84#endif