]>
Commit | Line | Data |
---|---|---|
cab6ff9b | 1 | #ifndef ALIITSVERTEXERTRACKS_H |
2 | #define ALIITSVERTEXERTRACKS_H | |
3 | /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | //------------------------------------------------------- | |
8 | // Class for primary vertex determination with ITS tracks | |
9 | // | |
10 | // Origin: A.Dainese, Padova, andrea.dainese@pd.infn.it | |
11 | // M.Masera, Torino, massimo.masera@to.infn.it | |
12 | //------------------------------------------------------- | |
13 | ||
14 | /***************************************************************************** | |
15 | * * | |
16 | * This class determines the primary vertex position using ITS tracks. * | |
17 | * This is done in two steps: * | |
18 | * 1) Vertex Finding: a reasonable estimate of the vertex position is * | |
19 | * obtained from a mean of "points of closest approach" between all * | |
20 | * possible pairs of tracks. * | |
21 | * 2) Vertex Fitting: once tracks are propagated to the position given by * | |
22 | * first step, the optimal estimate of the position of vertex is obtained * | |
23 | * from a weighted average of the track positions. A covariance * | |
24 | * matrix and a chi2 for the vertex are given. * | |
25 | * * | |
26 | *****************************************************************************/ | |
27 | ||
28 | #include "AliKalmanTrack.h" | |
29 | #include "AliITSVertexer.h" | |
11ba84a4 | 30 | #include "AliESD.h" |
cab6ff9b | 31 | |
3a4956bf | 32 | #include <TObjArray.h> |
33 | ||
cab6ff9b | 34 | class TTree; |
d681bb2d | 35 | class AliESDVertex; |
cab6ff9b | 36 | |
37 | class AliITSVertexerTracks : public AliITSVertexer { | |
38 | ||
39 | public: | |
40 | // default constructor | |
41 | AliITSVertexerTracks(); | |
42 | // standard constructor | |
11ba84a4 | 43 | AliITSVertexerTracks(TFile *inFile,TFile *outFile, |
44 | Double_t field=0.4,Int_t fEv=0,Int_t lEv=0, | |
45 | Double_t xStart=0.,Double_t yStart=0.); | |
46 | // alternative constructor | |
88cb7938 | 47 | AliITSVertexerTracks(Double_t field, TString fn, |
11ba84a4 | 48 | Double_t xStart=0,Double_t yStart=0); |
cab6ff9b | 49 | // destructor |
11ba84a4 | 50 | ~AliITSVertexerTracks(); |
cab6ff9b | 51 | // return vertex from the set of tracks in the tree |
d681bb2d | 52 | AliESDVertex* VertexOnTheFly(TTree &trkTree); |
cab6ff9b | 53 | // computes the vertex for the current event |
d681bb2d | 54 | virtual AliESDVertex* FindVertexForCurrentEvent(Int_t evnumb); |
11ba84a4 | 55 | // computes the vertex for the current event using the ESD |
d681bb2d | 56 | AliESDVertex* FindVertexForCurrentEvent(AliESD *esdEvent); |
88cb7938 | 57 | // computes the vertex for each event and stores it on file |
cab6ff9b | 58 | virtual void FindVertices(); |
11ba84a4 | 59 | // computes the vertex for each event and stores it in the ESD |
60 | void FindVerticesESD(); | |
cab6ff9b | 61 | virtual void PrintStatus() const; |
cab6ff9b | 62 | void SetField(Double_t field) const |
63 | { AliKalmanTrack::SetConvConst(100./0.299792458/field); return; } | |
11ba84a4 | 64 | void SetMinTracks(Int_t n=2) { fMinTracks = n; return; } |
65 | void SetSkipTracks(Int_t n,Int_t *skipped); | |
cab6ff9b | 66 | void SetVtxStart(Double_t x=0,Double_t y=0) |
67 | { fNominalPos[0]=x; fNominalPos[1]=y; return; } | |
68 | ||
69 | private: | |
11ba84a4 | 70 | TFile *fInFile; // input file (with tracks) |
71 | TFile *fOutFile; // output file for vertices | |
cab6ff9b | 72 | Double_t fInitPos[3]; // vertex position after vertex finder |
73 | Double_t fNominalPos[2]; // initial knowledge on vertex position | |
74 | Int_t fMinTracks; // minimum number of tracks | |
75 | Double_t fMaxChi2PerTrack; // maximum contribition to the chi2 | |
cab6ff9b | 76 | TObjArray fTrkArray; // array with tracks to be processed |
77 | Int_t *fTrksToSkip; // tracks to be skipped for find and fit | |
78 | Int_t fNTrksToSkip; // number of tracks to be skipped | |
79 | ||
80 | Bool_t CheckField() const; | |
81 | void ComputeMaxChi2PerTrack(Int_t nTracks); | |
82 | Int_t PrepareTracks(TTree &trkTree); | |
cab6ff9b | 83 | void TooFewTracks(); |
84 | void VertexFinder(); | |
85 | void VertexFitter(); | |
86 | ||
87 | ClassDef(AliITSVertexerTracks,1) // 3D Vertexing with ITS tracks | |
88 | }; | |
89 | ||
90 | #endif | |
91 | ||
92 | ||
93 |