3 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
4 //*-- Copyright © ALICE HLT Group
6 #include "AliHLTTPCSpacePointData.h"
7 #include "AliHLTTPCVertexData.h"
8 #include "AliHLTTPCLogging.h"
9 #include "AliHLTTPCVertexArray.h"
10 #include "AliHLTTPCVertex.h"
11 #include "AliHLTTPCVertexFinder.h"
12 #include "AliHLTTPCSpacePointData.h"
13 #include "AliHLTTPCTransform.h"
15 /** \class AliHLTTPCVertexFinder
17 //_____________________________________________________________
18 // AliHLTTPCVertexFinder
20 // Implementation of AliHLTTPCArray
24 // for(n=0;n<NMEMSEC;n++)
26 // FindSectorVertex();
27 // SetZ(GetZSector());
28 // SetZErr(GetZErrSector());
38 ClassImp(AliHLTTPCVertexFinder)
40 AliHLTTPCVertexFinder::AliHLTTPCVertexFinder()
43 // default constructor for the AliHLTTPCVertexFinder class.
58 AliHLTTPCVertexFinder::~AliHLTTPCVertexFinder()
65 void AliHLTTPCVertexFinder::Reset()
74 void AliHLTTPCVertexFinder::Read(Int_t ncluster, AliHLTTPCSpacePointData* hits )
80 const Int_t kseedRow = AliHLTTPCTransform::GetNRows() - 1;
81 const Int_t kfirstRow = kseedRow-32;
82 for(Int_t n=0;n<ncluster;n++){
83 if(hits[n].fPadRow==kseedRow)
84 FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy seeds in 3D
85 if(hits[n].fPadRow<=kseedRow && hits[n].fPadRow>=kfirstRow)
86 FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy data in 3D
90 void AliHLTTPCVertexFinder::Analyze()
97 SetZErr(GetZSectorErr());
98 LOG(AliHLTTPCLog::kInformational,"AliHLTTPCVertexFinder::Analyze","Result")
99 <<AliHLTTPCLog::kDec<<"Vertex: "<<GetZ()<<" RMS: "<<GetZErr()<<ENDLOG;
102 void AliHLTTPCVertexFinder::Write(AliHLTTPCVertex *vertex) const
107 vertex->SetX(GetX());
108 vertex->SetY(GetZ());
109 vertex->SetZ(GetZ());
110 vertex->SetXErr(GetXErr());
111 vertex->SetYErr(GetYErr());
112 vertex->SetZErr(GetZErr());
114 vertex->SetXYWeight(GetXYWeight());
117 void AliHLTTPCVertexFinder::Write(AliHLTTPCVertexData *vertex) const
125 vertex->fXErr=GetXErr();
126 vertex->fYErr=GetYErr();
127 vertex->fZErr=GetZErr();