3 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
4 //*-- Copyright © ALICE HLT Group
6 #include "AliHLTTPCStandardIncludes.h"
7 #include "AliHLTTPCRootTypes.h"
8 #include "AliHLTTPCSpacePointData.h"
9 #include "AliHLTTPCVertexData.h"
10 #include "AliHLTTPCLogging.h"
11 #include "AliHLTTPCVertexArray.h"
12 #include "AliHLTTPCVertex.h"
13 #include "AliHLTTPCVertexFinder.h"
14 #include "AliHLTTPCSpacePointData.h"
15 #include "AliHLTTPCTransform.h"
17 /** \class AliHLTTPCVertexFinder
19 //_____________________________________________________________
20 // AliHLTTPCVertexFinder
22 // Implementation of AliHLTTPCArray
26 // for(n=0;n<NMEMSEC;n++)
28 // FindSectorVertex();
29 // SetZ(GetZSector());
30 // SetZErr(GetZErrSector());
40 ClassImp(AliHLTTPCVertexFinder)
42 AliHLTTPCVertexFinder::AliHLTTPCVertexFinder()
45 // default constructor for the AliHLTTPCVertexFinder class.
60 AliHLTTPCVertexFinder::~AliHLTTPCVertexFinder()
67 void AliHLTTPCVertexFinder::Reset()
76 void AliHLTTPCVertexFinder::Read(Int_t ncluster, AliHLTTPCSpacePointData* hits )
82 const Int_t kseedRow = AliHLTTPCTransform::GetNRows() - 1;
83 const Int_t kfirstRow = kseedRow-32;
84 for(Int_t n=0;n<ncluster;n++){
85 if(hits[n].fPadRow==kseedRow)
86 FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy seeds in 3D
87 if(hits[n].fPadRow<=kseedRow && hits[n].fPadRow>=kfirstRow)
88 FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy data in 3D
92 void AliHLTTPCVertexFinder::Analyze()
99 SetZErr(GetZSectorErr());
100 LOG(AliHLTTPCLog::kInformational,"AliHLTTPCVertexFinder::Analyze","Result")
101 <<AliHLTTPCLog::kDec<<"Vertex: "<<GetZ()<<" RMS: "<<GetZErr()<<ENDLOG;
104 void AliHLTTPCVertexFinder::Write(AliHLTTPCVertex *vertex) const
109 vertex->SetX(GetX());
110 vertex->SetY(GetZ());
111 vertex->SetZ(GetZ());
112 vertex->SetXErr(GetXErr());
113 vertex->SetYErr(GetYErr());
114 vertex->SetZErr(GetZErr());
116 vertex->SetXYWeight(GetXYWeight());
119 void AliHLTTPCVertexFinder::Write(AliHLTTPCVertexData *vertex) const
127 vertex->fXErr=GetXErr();
128 vertex->fYErr=GetYErr();
129 vertex->fZErr=GetZErr();