]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCVertexFinder.cxx
documentation; deprecated defines deleted
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCVertexFinder.cxx
CommitLineData
a6c02c85 1// @(#) $Id$
4aa41877 2// Original: AliHLTVertexFinder.cxx,v 1.9 2005/06/14 10:55:21 cvetan
a6c02c85 3
4// Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
5//*-- Copyright &copy ALICE HLT Group
6
a6c02c85 7#include "AliHLTTPCSpacePointData.h"
8#include "AliHLTTPCVertexData.h"
9#include "AliHLTTPCLogging.h"
10#include "AliHLTTPCVertexArray.h"
11#include "AliHLTTPCVertex.h"
12#include "AliHLTTPCVertexFinder.h"
13#include "AliHLTTPCSpacePointData.h"
14#include "AliHLTTPCTransform.h"
15
16/** \class AliHLTTPCVertexFinder
17<pre>
18//_____________________________________________________________
19// AliHLTTPCVertexFinder
20//
21// Implementation of AliHLTTPCArray
22// usage:
23//
24// ResetSector();
25// for(n=0;n<NMEMSEC;n++)
26// Read();
27// FindSectorVertex();
28// SetZ(GetZSector());
29// SetZErr(GetZErrSector());
30//
31//
32</pre>
33*/
34
35#if __GNUC__ >= 3
36using namespace std;
37#endif
38
39ClassImp(AliHLTTPCVertexFinder)
40
41AliHLTTPCVertexFinder::AliHLTTPCVertexFinder()
42{
43 //
44 // default constructor for the AliHLTTPCVertexFinder class.
45 //
46
47 //Set vertex to zero.
48 SetX(0);
49 SetY(0);
50 SetZ(0);
51 SetXErr(1);
52 SetYErr(1);
53 SetZErr(1);
54 fR=0;
55 fPhi=0;
56 fMWxy = 1.;
57}
58
59AliHLTTPCVertexFinder::~AliHLTTPCVertexFinder()
60{
61 //
62 // destructor
63 //
64}
65
66void AliHLTTPCVertexFinder::Reset()
67{
68 //
69 // Reset
70 //
71 ResetSector();
72}
73
74
75void AliHLTTPCVertexFinder::Read(Int_t ncluster, AliHLTTPCSpacePointData* hits )
76{
77 //
78 // analyze sector
79 //
80
81 const Int_t kseedRow = AliHLTTPCTransform::GetNRows() - 1;
82 const Int_t kfirstRow = kseedRow-32;
83 for(Int_t n=0;n<ncluster;n++){
84 if(hits[n].fPadRow==kseedRow)
85 FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy seeds in 3D
86 if(hits[n].fPadRow<=kseedRow && hits[n].fPadRow>=kfirstRow)
87 FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy data in 3D
88 }
89}
90
91void AliHLTTPCVertexFinder::Analyze()
92{
93 //
94 // analyze all
95 //
96 FindSectorVertex();
97 SetZ(GetZSector());
98 SetZErr(GetZSectorErr());
99 LOG(AliHLTTPCLog::kInformational,"AliHLTTPCVertexFinder::Analyze","Result")
100 <<AliHLTTPCLog::kDec<<"Vertex: "<<GetZ()<<" RMS: "<<GetZErr()<<ENDLOG;
101}
102
103void AliHLTTPCVertexFinder::Write(AliHLTTPCVertex *vertex) const
104{
105 //
106 // write
107 //
108 vertex->SetX(GetX());
109 vertex->SetY(GetZ());
110 vertex->SetZ(GetZ());
111 vertex->SetXErr(GetXErr());
112 vertex->SetYErr(GetYErr());
113 vertex->SetZErr(GetZErr());
114
115 vertex->SetXYWeight(GetXYWeight());
116}
117
118void AliHLTTPCVertexFinder::Write(AliHLTTPCVertexData *vertex) const
119{
120 //
121 // write
122 //
123 vertex->fX=GetX();
124 vertex->fY=GetZ();
125 vertex->fZ=GetZ();
126 vertex->fXErr=GetXErr();
127 vertex->fYErr=GetYErr();
128 vertex->fZErr=GetZErr();
129}