]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSVertexerTracks.h
Remove AliTRDv2
[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 *****************************************************************************/
cab6ff9b 27#include "AliITSVertexer.h"
28
3a4956bf 29#include <TObjArray.h>
30
cab6ff9b 31class TTree;
d681bb2d 32class AliESDVertex;
f753671b 33class AliVertex;
a48d1ed3 34class AliESD;
66e811e2 35class AliITStrackV2;
cab6ff9b 36
37class AliITSVertexerTracks : public AliITSVertexer {
38
39 public:
40 // default constructor
7d0f8548 41 AliITSVertexerTracks();
cab6ff9b 42 // standard constructor
11ba84a4 43 AliITSVertexerTracks(TFile *inFile,TFile *outFile,
7d0f8548 44 Int_t fEv=0,Int_t lEv=0,
11ba84a4 45 Double_t xStart=0.,Double_t yStart=0.);
46 // alternative constructor
7d0f8548 47 AliITSVertexerTracks(TString fn,Double_t xStart=0,Double_t yStart=0);
cab6ff9b 48 // destructor
a48d1ed3 49 virtual ~AliITSVertexerTracks();
cab6ff9b 50 // return vertex from the set of tracks in the tree
d681bb2d 51 AliESDVertex* VertexOnTheFly(TTree &trkTree);
2d57349e 52 AliVertex* VertexForSelectedTracks(AliESD *esdEvent,Int_t nofCand, Int_t *trkPos, Int_t opt);
cab6ff9b 53 // computes the vertex for the current event
66e811e2 54 virtual AliESDVertex* FindPrimaryVertexForCurrentEvent(Int_t evnumb);
55 virtual AliESDVertex* FindVertexForCurrentEvent(Int_t evnumb){
56 Warning(" FindVertexForCurrentEvent","Deprecated method use FindPrimaryVertexForCurrentEvent instead");
57 return FindPrimaryVertexForCurrentEvent(evnumb);
58 }
11ba84a4 59 // computes the vertex for the current event using the ESD
66e811e2 60 AliESDVertex* FindPrimaryVertexForCurrentEvent(AliESD *esdEvent);
61 AliESDVertex* FindVertexForCurrentEvent(AliESD *esdEvent){
62 Warning(" FindVertexForCurrentEvent","Deprecated method use FindPrimaryVertexForCurrentEvent instead");
63 return FindPrimaryVertexForCurrentEvent(esdEvent);
64 }
88cb7938 65 // computes the vertex for each event and stores it on file
cab6ff9b 66 virtual void FindVertices();
11ba84a4 67 // computes the vertex for each event and stores it in the ESD
68 void FindVerticesESD();
66e811e2 69
66e811e2 70
cab6ff9b 71 virtual void PrintStatus() const;
11ba84a4 72 void SetMinTracks(Int_t n=2) { fMinTracks = n; return; }
73 void SetSkipTracks(Int_t n,Int_t *skipped);
cab6ff9b 74 void SetVtxStart(Double_t x=0,Double_t y=0)
75 { fNominalPos[0]=x; fNominalPos[1]=y; return; }
76
77 private:
a48d1ed3 78 // copy constructor (NO copy allowed: the constructor is protected
79 // to avoid misuse)
80 AliITSVertexerTracks(const AliITSVertexerTracks& vtxr);
81 // assignment operator (NO assignment allowed)
82 AliITSVertexerTracks& operator=(const AliITSVertexerTracks& /* vtxr */);
11ba84a4 83 TFile *fInFile; // input file (with tracks)
84 TFile *fOutFile; // output file for vertices
cab6ff9b 85 Double_t fNominalPos[2]; // initial knowledge on vertex position
86 Int_t fMinTracks; // minimum number of tracks
87 Double_t fMaxChi2PerTrack; // maximum contribition to the chi2
cab6ff9b 88 TObjArray fTrkArray; // array with tracks to be processed
89 Int_t *fTrksToSkip; // tracks to be skipped for find and fit
90 Int_t fNTrksToSkip; // number of tracks to be skipped
91
92 Bool_t CheckField() const;
93 void ComputeMaxChi2PerTrack(Int_t nTracks);
94 Int_t PrepareTracks(TTree &trkTree);
66e811e2 95 Int_t PrepareTracks(AliESD* esdEvent,Int_t NofCand, Int_t *TrkPos);
96 Double_t Prepare(AliITStrackV2* itstrack);
cab6ff9b 97 void TooFewTracks();
2d57349e 98 // void VertexFinder(Int_t OptUseWeights=0);
cab6ff9b 99 void VertexFitter();
100
9c0755ea 101 ClassDef(AliITSVertexerTracks,3) // 3D Vertexing with ITS tracks
cab6ff9b 102};
103
104#endif
105
106
107