A bug corrected (from A. Dainese and M. Masera)
[u/mrichter/AliRoot.git] / TPC / AliTPCtrackerParam.h
CommitLineData
6eb67451 1#ifndef ALITPCTRACKERPARAM_H
2#define ALITPCTRACKERPARAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. */
4/* See cxx source for full Copyright notice */
c68184b6 5
6/* $Id$ */
7
8
6eb67451 9//-----------------------------------------------------------------------------
10// TPC Tracking Parameterization Class
11//
12// Origin: Andrea Dainese, Padova - e-mail: andrea.dainese@pd.infn.it
13//-----------------------------------------------------------------------------
6eb69b9a 14#include <TMatrixD.h>
6eb67451 15#include "alles.h"
70521312 16#include "AliGausCorr.h"
6eb69b9a 17#include "AliMagF.h"
18#include "AliTPCkineGrid.h"
6eb67451 19#include "AliTPCtrack.h"
20
21class AliTPCtrackerParam {
6eb69b9a 22 /////////////////////////////////////////////////////////////////////////
23 //
24 // This class builds AliTPCtrack objects from generated tracks to feed
25 // ITS tracking (V2). The AliTPCtrack is built from its first hit in
26 // the TPC. The track is assigned a Kalman-like covariance matrix
27 // depending on its pT and pseudorapidity and track parameters are
28 // smeared according to this covariance matrix.
29 // Output file contains sorted tracks, ready for matching with ITS.
30 //
31 // For details:
32 // http://www.pd.infn.it/alipd/talks/soft/adIII02/TPCtrackingParam.htm
33 //
34 // Test macro is: AliBarrelRec_TPCparam.C
35 //
36 // Origin: Andrea Dainese, Padova - e-mail: andrea.dainese@pd.infn.it
37 //
38 /////////////////////////////////////////////////////////////////////////
6eb67451 39 public:
40 AliTPCtrackerParam(const Int_t coll=0,const Double_t Bz=0.4);
41 virtual ~AliTPCtrackerParam();
42
6eb69b9a 43 // this function performs the parameterized tracking
6eb67451 44 Int_t BuildTPCtracks(const TFile *inp, TFile *out,Int_t n=1);
45
6eb69b9a 46 // these functions are used to create a DB of cov. matrices,
47 // including regularization, efficiencies and dE/dx
48 void AllGeantTracks() { fSelAndSmear=kFALSE; return; }
49 void AnalyzedEdx(const Char_t *outName,Int_t pdg);
50 void AnalyzePulls(const Char_t *outName);
51 void CompareTPCtracks(const Char_t *galiceName="galice.root",
52 const Char_t *trkGeaName="AliTPCtracksGeant.root",
53 const Char_t *trkKalName="AliTPCtracksSorted.root",
54 const Char_t *covmatName="CovMatrix.root",
55 const Char_t *tpceffName="TPCeff.dat") const;
56 void DrawEffs(const Char_t *inName,Int_t pdg=211);
57 void DrawPulls(const Char_t *inName,Int_t pdg=211,Int_t par=0);
58 void MakeDataBase();
59 void MergeEvents(Int_t evFirst=1,Int_t evLast=1);
60 void RegularizeCovMatrix(const Char_t *outName,Int_t pdg);
61
62 class AliTPCtrackParam : public AliTPCtrack {
63 public:
64 AliTPCtrackParam():AliTPCtrack(){}
65 AliTPCtrackParam(const AliTPCtrack &t):AliTPCtrack(t){}
66
67 void AssignMass(Double_t mass) {SetMass(mass); return;}
68
69 private:
6eb67451 70
6eb69b9a 71 };
6eb67451 72
6eb69b9a 73 private:
74 Double_t fBz; // value of the z component of L3 field (Tesla)
75 Int_t fColl; // collision code (0: PbPb6000)
76 Bool_t fSelAndSmear; // if kFALSE returns GEANT tracks
77 // at TPC first hit
78 TString fDBfileName; // DataBase file name
6eb67451 79
6eb69b9a 80 AliTPCtrack fTrack; // current track
81
82 TTree *fCovTree; // tree with regularized cov matrices
83 // for the current track
84
85 AliTPCkineGrid *fDBgrid; // grid for the cov matrix look-up table
86 AliTPCkineGrid fDBgridPi; // " for pions
87 AliTPCkineGrid fDBgridKa; // " for kaons
88 AliTPCkineGrid fDBgridEl; // " for electrons
89
90 AliTPCkineGrid *fEff; // TPC efficiencies for the current track
91 AliTPCkineGrid fEffPi; // " pions
92 AliTPCkineGrid fEffKa; // " kaons
93 AliTPCkineGrid fEffPr; // " protons
94 AliTPCkineGrid fEffEl; // " electrons
95 AliTPCkineGrid fEffMu; // " muons
96
97 AliTPCkineGrid *fPulls; // pulls for the current track
98 AliTPCkineGrid fPullsPi[5]; // " pions
99 AliTPCkineGrid fPullsKa[5]; // " muons
100 AliTPCkineGrid fPullsEl[5]; // " electrons
101
102 TMatrixD *fRegPar; // regularization parameters for the curr. track
103 TMatrixD fRegParPi; // " for pions
104 TMatrixD fRegParKa; // " for kaons
105 TMatrixD fRegParEl; // " for electrons
106
107 AliTPCkineGrid *fdEdxMean; // dEdx mean for the current track
108 AliTPCkineGrid fdEdxMeanPi; // " pions
109 AliTPCkineGrid fdEdxMeanKa; // " kaons
110 AliTPCkineGrid fdEdxMeanPr; // " protons
111 AliTPCkineGrid fdEdxMeanEl; // " electrons
112
113 AliTPCkineGrid *fdEdxRMS; // dEdx RMS for the current track
114 AliTPCkineGrid fdEdxRMSPi; // " pions
115 AliTPCkineGrid fdEdxRMSKa; // " kaons
116 AliTPCkineGrid fdEdxRMSPr; // " protons
117 AliTPCkineGrid fdEdxRMSEl; // " electrons
118
119
120 void BuildTrack(Double_t alpha,Double_t x,Double_t y,Double_t z,
121 Double_t px,Double_t py,Double_t pz,Double_t pt,
122 Int_t ch);
123 void CookdEdx(Double_t pt,Double_t eta);
124 void CookTrack(Double_t pt,Double_t eta);
125 Int_t GetBin(Double_t pt,Double_t eta) const;
126 TMatrixD GetSmearingMatrix(Double_t *cc, Double_t pt,Double_t eta) const;
127 void InitializeKineGrid(Option_t *which,Option_t *how);
128 Int_t ReadAllData(const Char_t *inName);
129 Int_t ReadDBgrid(const Char_t *inName);
130 Int_t ReaddEdx(const Char_t *inName,Int_t pdg);
131 Int_t ReadEffs(const Char_t *inName);
132 Int_t ReadPulls(const Char_t *inName);
133 Int_t ReadRegParams(const Char_t *inName,Int_t pdg);
134 Bool_t SelectedTrack(Double_t pt, Double_t eta) const;
135 void SetParticle(Int_t pdg);
136 void SmearTrack(Double_t *xx,Double_t *xxsm,TMatrixD cov) const;
137 Int_t WritedEdx(const Char_t *outName,Int_t pdg);
138 Int_t WriteEffs(const Char_t *outName);
139 Int_t WritePulls(const Char_t *outName);
140 Int_t WriteRegParams(const Char_t *outName,Int_t pdg);
6eb67451 141
142
e130146c 143 ClassDef(AliTPCtrackerParam,1) // TPC tracking parameterization class
6eb67451 144};
145
146#endif
147
148
6eb69b9a 149
150
151
152
153
154
155
156
157
158
159