]>
Commit | Line | Data |
---|---|---|
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 | ||
c02ca99d | 9 | ///////////////////////////////////////////////////////////////////////// |
10 | // | |
11 | // This class builds AliTPCtrack objects from generated tracks to feed | |
12 | // ITS tracking (V2). The AliTPCtrack is built from its first hit in | |
13 | // the TPC. The track is assigned a Kalman-like covariance matrix | |
14 | // depending on its pT and pseudorapidity and track parameters are | |
15 | // smeared according to this covariance matrix. | |
16 | // Output file contains sorted tracks, ready for matching with ITS. | |
17 | // | |
18 | // See implementation file for more details. | |
19 | // | |
20 | // | |
21 | // Origin: Andrea Dainese, Padova - e-mail: andrea.dainese@pd.infn.it | |
a654e257 | 22 | // adapted to ESD output by: Marcello Lunardon, Padova |
c02ca99d | 23 | ///////////////////////////////////////////////////////////////////////// |
24 | ||
b2bca9d4 | 25 | |
26 | //----- Root headers --------- | |
bf6adc12 | 27 | class TTree; |
6eb69b9a | 28 | #include <TMatrixD.h> |
b2bca9d4 | 29 | //---- AliRoot headers ------- |
bf6adc12 | 30 | #include "AliConfig.h" |
6eb69b9a | 31 | #include "AliTPCkineGrid.h" |
6eb67451 | 32 | #include "AliTPCtrack.h" |
a654e257 | 33 | #include "AliESD.h" |
b2bca9d4 | 34 | //---------------------------- |
6eb67451 | 35 | |
6d75e4b6 | 36 | class AliTPC; |
37 | ||
0dadef40 | 38 | class AliTPCtrackerParam: |
39 | public TObject | |
40 | { | |
41 | ||
6eb67451 | 42 | public: |
a654e257 | 43 | AliTPCtrackerParam(Int_t coll=0, Double_t Bz=0.4, |
e191bb57 | 44 | const char* evfoldname = AliConfig::GetDefaultEventFolderName()); |
6eb67451 | 45 | virtual ~AliTPCtrackerParam(); |
46 | ||
6eb69b9a | 47 | // this function performs the parameterized tracking |
110d52b0 | 48 | // |
0dadef40 | 49 | AliTPCtrackerParam(const AliTPCtrackerParam& p); |
110d52b0 | 50 | // |
a654e257 | 51 | Int_t Init(); |
52 | Int_t BuildTPCtracks(AliESD* event); | |
6eb69b9a | 53 | // these functions are used to create a DB of cov. matrices, |
54 | // including regularization, efficiencies and dE/dx | |
55 | void AllGeantTracks() { fSelAndSmear=kFALSE; return; } | |
56 | void AnalyzedEdx(const Char_t *outName,Int_t pdg); | |
57 | void AnalyzePulls(const Char_t *outName); | |
b2bca9d4 | 58 | void AnalyzeResolutions(Int_t pdg); |
a654e257 | 59 | void CompareTPCtracks(Int_t nEvents=1, |
60 | const Char_t *galiceName="galice.root", | |
6eb69b9a | 61 | const Char_t *trkGeaName="AliTPCtracksGeant.root", |
62 | const Char_t *trkKalName="AliTPCtracksSorted.root", | |
63 | const Char_t *covmatName="CovMatrix.root", | |
b2bca9d4 | 64 | const Char_t *tpceffasciiName="TPCeff.dat", |
65 | const Char_t *tpceffrootName="TPCeff.root"); | |
6eb69b9a | 66 | void DrawEffs(const Char_t *inName,Int_t pdg=211); |
67 | void DrawPulls(const Char_t *inName,Int_t pdg=211,Int_t par=0); | |
68 | void MakeDataBase(); | |
69 | void MergeEvents(Int_t evFirst=1,Int_t evLast=1); | |
70 | void RegularizeCovMatrix(const Char_t *outName,Int_t pdg); | |
71 | ||
b2bca9d4 | 72 | |
73 | //********* Internal class definition ******* | |
6eb69b9a | 74 | class AliTPCtrackParam : public AliTPCtrack { |
75 | public: | |
76 | AliTPCtrackParam():AliTPCtrack(){} | |
77 | AliTPCtrackParam(const AliTPCtrack &t):AliTPCtrack(t){} | |
78 | ||
79 | void AssignMass(Double_t mass) {SetMass(mass); return;} | |
80 | ||
81 | private: | |
6eb69b9a | 82 | }; |
b2bca9d4 | 83 | //********* end of internal class *********** |
6eb67451 | 84 | |
b2bca9d4 | 85 | //********* Internal class definition ******* |
86 | class AliTPCseedGeant : public TObject { | |
87 | public: | |
110d52b0 | 88 | AliTPCseedGeant(Double_t x=0.,Double_t y=0.,Double_t z=0., |
89 | Double_t px=0.,Double_t py=0.,Double_t pz=0., | |
90 | Int_t lab=0); | |
91 | Int_t GetLabel() const { return fLabel; } | |
92 | Double_t GetAlpha() const { return fAlpha; } | |
a654e257 | 93 | Double_t GetXG() const { return fXg; } |
94 | Double_t GetYG() const { return fYg; } | |
95 | Double_t GetZG() const { return fZg; } | |
110d52b0 | 96 | Double_t GetXL() const |
97 | { return fXg*TMath::Cos(fAlpha)+fYg*TMath::Sin(fAlpha); } | |
98 | Double_t GetYL() const | |
99 | { return -fXg*TMath::Sin(fAlpha)+fYg*TMath::Cos(fAlpha); } | |
100 | Double_t GetZL() const { return fZg; } | |
101 | Double_t GetPx() const { return fPx; } | |
102 | Double_t GetPy() const { return fPy; } | |
103 | Double_t GetPz() const { return fPz; } | |
104 | Double_t GetPt() const { return TMath::Sqrt(fPx*fPx+fPy*fPy); } | |
105 | Double_t GetEta() const | |
106 | { return -TMath::Log(TMath::Tan(0.25*TMath::Pi()-0.5*TMath::ATan(fPz/GetPt()))); } | |
b2bca9d4 | 107 | void SetLabel(Int_t lab) { fLabel=lab; return; } |
110d52b0 | 108 | Bool_t InTPCAcceptance() const { |
b2bca9d4 | 109 | if(TMath::Abs(GetZL()+(244.-GetXL())*fPz/GetPt())>252.) return kFALSE; |
110 | return kTRUE; | |
111 | } | |
112 | ||
113 | private: | |
110d52b0 | 114 | Double_t fXg; // global x of seed |
115 | Double_t fYg; // global y of seed | |
116 | Double_t fZg; // global z of seed | |
117 | Double_t fPx; // global px | |
118 | Double_t fPy; // global py | |
119 | Double_t fPz; // global pz | |
120 | Double_t fAlpha; // alpha angle | |
121 | Int_t fLabel; // track label | |
122 | Int_t fSector; // TPC sector | |
b2bca9d4 | 123 | }; |
124 | //******* end of internal class **************** | |
125 | ||
6eb69b9a | 126 | private: |
c02ca99d | 127 | AliTPCtrackerParam & operator=(const AliTPCtrackerParam & ); |
128 | ||
88cb7938 | 129 | TString fEvFolderName;//! name of data folder |
130 | ||
6eb69b9a | 131 | Double_t fBz; // value of the z component of L3 field (Tesla) |
b2bca9d4 | 132 | Int_t fColl; // collision code (0: PbPb6000; 1: pp) |
6eb69b9a | 133 | Bool_t fSelAndSmear; // if kFALSE returns GEANT tracks |
134 | // at TPC first hit | |
135 | TString fDBfileName; // DataBase file name | |
6eb67451 | 136 | |
6eb69b9a | 137 | AliTPCtrack fTrack; // current track |
138 | ||
139 | TTree *fCovTree; // tree with regularized cov matrices | |
140 | // for the current track | |
a654e257 | 141 | TTree *fCovTreePi[30]; |
142 | TTree *fCovTreeKa[30]; | |
143 | TTree *fCovTreePr[30]; | |
144 | TTree *fCovTreeEl[30]; | |
145 | TTree *fCovTreeMu[30]; | |
6eb69b9a | 146 | |
147 | AliTPCkineGrid *fDBgrid; // grid for the cov matrix look-up table | |
148 | AliTPCkineGrid fDBgridPi; // " for pions | |
149 | AliTPCkineGrid fDBgridKa; // " for kaons | |
b2bca9d4 | 150 | AliTPCkineGrid fDBgridPr; // " for protons |
6eb69b9a | 151 | AliTPCkineGrid fDBgridEl; // " for electrons |
b2bca9d4 | 152 | AliTPCkineGrid fDBgridMu; // " for muons |
6eb69b9a | 153 | |
154 | AliTPCkineGrid *fEff; // TPC efficiencies for the current track | |
155 | AliTPCkineGrid fEffPi; // " pions | |
156 | AliTPCkineGrid fEffKa; // " kaons | |
157 | AliTPCkineGrid fEffPr; // " protons | |
158 | AliTPCkineGrid fEffEl; // " electrons | |
159 | AliTPCkineGrid fEffMu; // " muons | |
160 | ||
161 | AliTPCkineGrid *fPulls; // pulls for the current track | |
162 | AliTPCkineGrid fPullsPi[5]; // " pions | |
163 | AliTPCkineGrid fPullsKa[5]; // " muons | |
b2bca9d4 | 164 | AliTPCkineGrid fPullsPr[5]; // " protons |
6eb69b9a | 165 | AliTPCkineGrid fPullsEl[5]; // " electrons |
b2bca9d4 | 166 | AliTPCkineGrid fPullsMu[5]; // " muons |
6eb69b9a | 167 | |
168 | TMatrixD *fRegPar; // regularization parameters for the curr. track | |
169 | TMatrixD fRegParPi; // " for pions | |
170 | TMatrixD fRegParKa; // " for kaons | |
b2bca9d4 | 171 | TMatrixD fRegParPr; // " for protons |
6eb69b9a | 172 | TMatrixD fRegParEl; // " for electrons |
b2bca9d4 | 173 | TMatrixD fRegParMu; // " for muons |
6eb69b9a | 174 | |
175 | AliTPCkineGrid *fdEdxMean; // dEdx mean for the current track | |
176 | AliTPCkineGrid fdEdxMeanPi; // " pions | |
177 | AliTPCkineGrid fdEdxMeanKa; // " kaons | |
178 | AliTPCkineGrid fdEdxMeanPr; // " protons | |
179 | AliTPCkineGrid fdEdxMeanEl; // " electrons | |
b2bca9d4 | 180 | AliTPCkineGrid fdEdxMeanMu; // " muons |
6eb69b9a | 181 | |
182 | AliTPCkineGrid *fdEdxRMS; // dEdx RMS for the current track | |
183 | AliTPCkineGrid fdEdxRMSPi; // " pions | |
184 | AliTPCkineGrid fdEdxRMSKa; // " kaons | |
185 | AliTPCkineGrid fdEdxRMSPr; // " protons | |
186 | AliTPCkineGrid fdEdxRMSEl; // " electrons | |
b2bca9d4 | 187 | AliTPCkineGrid fdEdxRMSMu; // " muons |
6eb69b9a | 188 | |
189 | ||
b2bca9d4 | 190 | void BuildTrack(AliTPCseedGeant *s,Int_t ch); |
6eb69b9a | 191 | void CookdEdx(Double_t pt,Double_t eta); |
192 | void CookTrack(Double_t pt,Double_t eta); | |
6eb69b9a | 193 | TMatrixD GetSmearingMatrix(Double_t *cc, Double_t pt,Double_t eta) const; |
b2bca9d4 | 194 | void InitializeKineGrid(Option_t *which); |
110d52b0 | 195 | void MakeSeedsFromHits(AliTPC *tpc,TTree *th,TObjArray &seedArray) const; |
196 | void MakeSeedsFromRefs(TTree *ttr, | |
b2bca9d4 | 197 | TObjArray &seedArray) const; |
6eb69b9a | 198 | Int_t ReadAllData(const Char_t *inName); |
199 | Int_t ReadDBgrid(const Char_t *inName); | |
200 | Int_t ReaddEdx(const Char_t *inName,Int_t pdg); | |
201 | Int_t ReadEffs(const Char_t *inName); | |
202 | Int_t ReadPulls(const Char_t *inName); | |
203 | Int_t ReadRegParams(const Char_t *inName,Int_t pdg); | |
a654e257 | 204 | Int_t ReadCovTrees(const Char_t* inName); |
6eb69b9a | 205 | Bool_t SelectedTrack(Double_t pt, Double_t eta) const; |
206 | void SetParticle(Int_t pdg); | |
207 | void SmearTrack(Double_t *xx,Double_t *xxsm,TMatrixD cov) const; | |
208 | Int_t WritedEdx(const Char_t *outName,Int_t pdg); | |
209 | Int_t WriteEffs(const Char_t *outName); | |
210 | Int_t WritePulls(const Char_t *outName); | |
211 | Int_t WriteRegParams(const Char_t *outName,Int_t pdg); | |
6eb67451 | 212 | |
213 | ||
e130146c | 214 | ClassDef(AliTPCtrackerParam,1) // TPC tracking parameterization class |
6eb67451 | 215 | }; |
216 | ||
217 | #endif | |
218 | ||
219 | ||
6eb69b9a | 220 | |
221 | ||
222 | ||
223 | ||
224 | ||
225 | ||
226 | ||
227 | ||
228 | ||
229 | ||
230 |