]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSVertexerTracks.h
Bug in geometry corrected
[u/mrichter/AliRoot.git] / ITS / AliITSVertexerTracks.h
CommitLineData
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"
30
31class TTree;
32class TFile;
33class TObjArray;
34class AliITSVertex;
35
36class AliITSVertexerTracks : public AliITSVertexer {
37
38 public:
39 // default constructor
40 AliITSVertexerTracks();
41 // standard constructor
42 AliITSVertexerTracks(TFile *inFile,TFile *outFile,Double_t field,
43 Double_t xStart=0,Double_t yStart=0,Int_t useThFr=0);
44 // destructor
45 virtual ~AliITSVertexerTracks() {}
46 // return vertex from the set of tracks in the tree
47 AliITSVertex *VertexOnTheFly(TTree &trkTree);
48 // computes the vertex for the current event
49 virtual AliITSVertex* FindVertexForCurrentEvent(Int_t evnumb);
50 // computes the vertex for each event and stores it on fOutFile
51 virtual void FindVertices();
52 virtual void PrintStatus() const;
53 // computes the vertex for the current event
54 void SetField(Double_t field) const
55 { AliKalmanTrack::SetConvConst(100./0.299792458/field); return; }
56 void SetMinTracks(Int_t n=3) { fMinTracks = n; return; }
57 void SetSkipTracks(Int_t n,Int_t *skipped);
58 void SetUseThrustFrame(Int_t utf=0) { fUseThrustFrame = utf; return; }
59 void SetVtxStart(Double_t x=0,Double_t y=0)
60 { fNominalPos[0]=x; fNominalPos[1]=y; return; }
61
62 private:
63 Double_t fInitPos[3]; // vertex position after vertex finder
64 Double_t fNominalPos[2]; // initial knowledge on vertex position
65 Int_t fMinTracks; // minimum number of tracks
66 Double_t fMaxChi2PerTrack; // maximum contribition to the chi2
67 Int_t fUseThrustFrame; // if !=0 vertex is given in thrust ref. frame
68 Double_t fPhiThrust; // thrust direction
69 TObjArray fTrkArray; // array with tracks to be processed
70 Int_t *fTrksToSkip; // tracks to be skipped for find and fit
71 Int_t fNTrksToSkip; // number of tracks to be skipped
72
73 Bool_t CheckField() const;
74 void ComputeMaxChi2PerTrack(Int_t nTracks);
75 Int_t PrepareTracks(TTree &trkTree);
76 void SetPhiThrust(Double_t phi=0.) { fPhiThrust=phi; return; }
77 Double_t SumPl(TTree &momTree,Double_t phi) const;
78 void ThrustFinderXY();
79 void TooFewTracks();
80 void VertexFinder();
81 void VertexFitter();
82
83 ClassDef(AliITSVertexerTracks,1) // 3D Vertexing with ITS tracks
84};
85
86#endif
87
88
89