]>
Commit | Line | Data |
---|---|---|
2d57349e | 1 | #ifndef ALIVERTEXERTRACKS_H |
2 | #define ALIVERTEXERTRACKS_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 vertex determination with ESD tracks | |
9 | // | |
10 | // Origin: AliITSVertexerTracks | |
11 | // A.Dainese, Padova, andrea.dainese@pd.infn.it | |
12 | // M.Masera, Torino, massimo.masera@to.infn.it | |
13 | // Moved to STEER and adapted to ESD tracks: | |
14 | // F.Prino, Torino, prino@to.infn.it | |
15 | //------------------------------------------------------- | |
16 | ||
17 | /***************************************************************************** | |
18 | * * | |
19 | * This class determines the vertex of a set of ESD tracks. * | |
20 | * Different algorithms are implemented, see data member fAlgo. * | |
21 | * * | |
22 | *****************************************************************************/ | |
23 | ||
c5e3e5d1 | 24 | #include "AliESDVertex.h" |
2d57349e | 25 | #include "AliTracker.h" |
ec1be5d5 | 26 | #include "AliLog.h" |
2d57349e | 27 | |
28 | #include <TObjArray.h> | |
29 | ||
30 | class TTree; | |
2d57349e | 31 | class AliESD; |
32 | ||
33 | class AliVertexerTracks : public TObject { | |
34 | ||
35 | public: | |
36 | AliVertexerTracks(); | |
37 | AliVertexerTracks(Double_t xStart, Double_t yStart); | |
38 | virtual ~AliVertexerTracks(); | |
39 | ||
c5e3e5d1 | 40 | |
2d57349e | 41 | // computes the vertex from the set of tracks in the tree |
42 | AliVertex* VertexForSelectedTracks(TTree *trkTree); | |
43 | AliVertex* VertexForSelectedTracks(TObjArray *trkArray); | |
ec1be5d5 | 44 | AliESDVertex* FindPrimaryVertex(const AliESD *esdEvent); |
0c69be49 | 45 | void SetMinTracks(Int_t n=1) { fMinTracks = n; return; } |
50ff0bcd | 46 | void SetITSNotRequired() { fITSrefit=kFALSE;fITSin=kFALSE; return; } |
47 | void SetITSrefitNotRequired() { fITSrefit=kFALSE; return; } | |
07680cae | 48 | void SetMinITSClusters(Int_t n=5) { fMinITSClusters = n; return; } |
ec1be5d5 | 49 | void SetSkipTracks(Int_t n,Int_t *skipped); |
50ff0bcd | 50 | void SetDebug(Int_t optdebug=0) {fDebug=optdebug;} |
07680cae | 51 | void SetVtxStart(Double_t x=0,Double_t y=0,Double_t z=0) |
52 | { fNominalPos[0]=x; fNominalPos[1]=y; fNominalPos[2]=z; return; } | |
53 | void SetVtxStartSigma(Double_t sx=3,Double_t sy=3,Double_t sz=6) | |
50ff0bcd | 54 | { fNominalCov[0]=sx*sx; fNominalCov[2]=sy*sy; fNominalCov[5]=sz*sz; |
55 | fNominalCov[1]=0.; fNominalCov[3]=0.; fNominalCov[4]=0.; return; } | |
56 | void SetVtxStart(AliESDVertex *vtx); | |
57 | void SetDCAcut(Double_t maxdca) { fDCAcut=maxdca; return; } | |
58 | void SetFinderAlgorithm(Int_t opt=1) { fAlgo=opt; return; } | |
59 | void SetNSigmad0(Double_t n=3) { fNSigma=n; return; } | |
60 | Double_t GetNSigmad0() const { return fNSigma; } | |
71d84967 | 61 | static Double_t GetStrLinMinDist(Double_t *p0,Double_t *p1,Double_t *x0); |
62 | static Double_t GetDeterminant3X3(Double_t matr[][3]); | |
63 | static void GetStrLinDerivMatrix(Double_t *p0,Double_t *p1,Double_t (*m)[3],Double_t *d); | |
64 | static void GetStrLinDerivMatrix(Double_t *p0,Double_t *p1,Double_t *sigmasq,Double_t (*m)[3],Double_t *d); | |
07680cae | 65 | |
2d57349e | 66 | protected: |
318aecb9 | 67 | Double_t GetField() const { |
68 | if(!AliTracker::GetFieldMap()) | |
69 | AliFatal("Field map not set; use AliTracker::SetFieldMap()!"); | |
70 | return AliTracker::GetBz(); } | |
50ff0bcd | 71 | Int_t PrepareTracks(TTree &trkTree,Int_t OptImpParCut); |
0c69be49 | 72 | void OneTrackVertFinder(); |
2d57349e | 73 | void VertexFinder(Int_t optUseWeights=0); |
74 | void HelixVertexFinder(); | |
75 | void StrLinVertexFinderMinDist(Int_t OptUseWeights=0); | |
07680cae | 76 | void VertexFitter(Bool_t useNominaVtx=kFALSE); |
eae1677e | 77 | void TooFewTracks(const AliESD *esdEvent); |
78 | ||
71d84967 | 79 | |
ec1be5d5 | 80 | AliVertex fVert; // vertex after vertex finder |
81 | AliESDVertex *fCurrentVertex; // ESD vertex after fitter | |
07680cae | 82 | Double_t fNominalPos[3]; // initial knowledge on vertex position |
50ff0bcd | 83 | Double_t fNominalCov[6]; // initial knowledge on vertex position |
2d57349e | 84 | Int_t fMinTracks; // minimum number of tracks |
07680cae | 85 | Int_t fMinITSClusters; // minimum number of ITS clusters per track |
2d57349e | 86 | TObjArray fTrkArray; // array with tracks to be processed |
ec1be5d5 | 87 | Int_t *fTrksToSkip; // tracks to be skipped for find and fit |
88 | Int_t fNTrksToSkip; // number of tracks to be skipped | |
2d57349e | 89 | Double_t fDCAcut; // maximum DCA between 2 tracks used for vertex |
90 | Int_t fAlgo; // option for vertex finding algorythm | |
07680cae | 91 | Double_t fNSigma; // number of sigmas for d0 cut in PrepareTracks() |
50ff0bcd | 92 | Bool_t fITSin; // if kTRUE (default), use only kITSin tracks |
93 | // if kFALSE, use all tracks (also TPC only) | |
94 | Bool_t fITSrefit; // if kTRUE (default), use only kITSrefit tracks | |
95 | // if kFALSE, use all tracks (also TPC only) | |
96 | Int_t fDebug; //! debug flag - verbose printing if >0 | |
2d57349e | 97 | // fAlgo=1 (default) finds minimum-distance point among all selected tracks |
98 | // approximated as straight lines | |
99 | // and uses errors on track parameters as weights | |
100 | // fAlgo=2 finds minimum-distance point among all the selected tracks | |
101 | // approximated as straight lines | |
102 | // fAlgo=3 finds the average point among DCA points of all pairs of tracks | |
103 | // treated as helices | |
104 | // fAlgo=4 finds the average point among DCA points of all pairs of tracks | |
105 | // approximated as straight lines | |
106 | // and uses errors on track parameters as weights | |
107 | // fAlgo=5 finds the average point among DCA points of all pairs of tracks | |
108 | // approximated as straight lines | |
109 | ||
fe12e09c | 110 | private: |
111 | AliVertexerTracks(const AliVertexerTracks & source); | |
112 | AliVertexerTracks & operator=(const AliVertexerTracks & source); | |
2d57349e | 113 | |
50ff0bcd | 114 | ClassDef(AliVertexerTracks,5) // 3D Vertexing with ESD tracks |
2d57349e | 115 | }; |
116 | ||
117 | #endif |