1 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
2 //*-- Copyright © Uli
4 #include "AliL3StandardIncludes.h"
6 #include "AliL3Logging.h"
7 #include "AliL3VertexArray.h"
8 #include "AliL3Vertex.h"
9 #include "AliL3VertexFinder.h"
10 #include "AliL3SpacePointData.h"
11 #include "AliL3Transform.h"
13 //_____________________________________________________________
16 // Implementation of AliL3Array
20 // for(n=0;n<NMEMSEC;n++)
22 // FindSectorVertex();
23 // SetZ(GetZSector());
24 // SetZErr(GetZErrSector());
28 ClassImp(AliL3VertexFinder)
29 AliL3VertexFinder::AliL3VertexFinder(){
31 // default constructor for the AliL3VertexFinder class.
48 AliL3VertexFinder::~AliL3VertexFinder(){
54 void AliL3VertexFinder::Reset(){
59 void AliL3VertexFinder::Read(Int_t ncluster, AliL3SpacePointData* hits ){
64 const Int_t seedRow = AliL3Transform::GetNRows() - 1;
65 const Int_t firstRow = seedRow-32;
66 for(Int_t n=0;n<ncluster;n++){
67 if(hits[n].fPadRow==seedRow)
68 FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy seeds in 3D
69 if(hits[n].fPadRow<=seedRow && hits[n].fPadRow>=firstRow)
70 FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy data in 3D
74 void AliL3VertexFinder::Analyze(){
77 SetZErr(GetZSectorErr());
78 LOG(AliL3Log::kInformational,"AliL3VertexFinder::Analyze","Result")
79 <<AliL3Log::kDec<<"Vertex: "<<GetZ()<<" RMS: "<<GetZErr()<<ENDLOG;
82 void AliL3VertexFinder::Write(AliL3Vertex *vertex){
86 vertex->SetXErr(GetXErr());
87 vertex->SetYErr(GetYErr());
88 vertex->SetZErr(GetZErr());
90 vertex->SetXYWeight(GetXYWeight());
93 void AliL3VertexFinder::Write(AliL3VertexData *vertex){
97 vertex->fXErr=GetXErr();
98 vertex->fYErr=GetYErr();
99 vertex->fZErr=GetZErr();