]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
b661165c | 3 | // Author: Uli Frankenfeld <mailto:franken@fi.uib.no> |
3e87ef69 | 4 | //*-- Copyright © ALICE HLT Group |
108615fc | 5 | |
118c26c3 | 6 | #include "AliL3StandardIncludes.h" |
7 | ||
108615fc | 8 | #include "AliL3Logging.h" |
9 | #include "AliL3VertexArray.h" | |
10 | #include "AliL3Vertex.h" | |
11 | #include "AliL3VertexFinder.h" | |
12 | #include "AliL3SpacePointData.h" | |
68a27388 | 13 | #include "AliL3Transform.h" |
108615fc | 14 | |
3e87ef69 | 15 | /** \class AliL3VertexFinder |
16 | <pre> | |
108615fc | 17 | //_____________________________________________________________ |
108615fc | 18 | // AliL3VertexFinder |
19 | // | |
b661165c | 20 | // Implementation of AliL3Array |
21 | // usage: | |
108615fc | 22 | // |
23 | // ResetSector(); | |
24 | // for(n=0;n<NMEMSEC;n++) | |
25 | // Read(); | |
26 | // FindSectorVertex(); | |
27 | // SetZ(GetZSector()); | |
28 | // SetZErr(GetZErrSector()); | |
b661165c | 29 | // |
108615fc | 30 | // |
3e87ef69 | 31 | </pre> |
32 | */ | |
108615fc | 33 | |
34 | ClassImp(AliL3VertexFinder) | |
35 | AliL3VertexFinder::AliL3VertexFinder(){ | |
36 | // | |
37 | // default constructor for the AliL3VertexFinder class. | |
38 | // | |
39 | ||
40 | //Set vertex to zero. | |
41 | SetX(0); | |
42 | SetY(0); | |
43 | SetZ(0); | |
44 | SetXErr(1); | |
45 | SetYErr(1); | |
46 | SetZErr(1); | |
47 | fR=0; | |
48 | fPhi=0; | |
49 | ||
50 | fMWxy = 1.; | |
51 | ||
52 | } | |
53 | ||
54 | AliL3VertexFinder::~AliL3VertexFinder(){ | |
55 | // | |
56 | // destructor | |
57 | // | |
58 | } | |
59 | ||
60 | void AliL3VertexFinder::Reset(){ | |
61 | ResetSector(); | |
62 | } | |
63 | ||
64 | ||
65 | void AliL3VertexFinder::Read(Int_t ncluster, AliL3SpacePointData* hits ){ | |
66 | // | |
67 | // analyze sector | |
68 | // | |
69 | ||
68a27388 | 70 | const Int_t seedRow = AliL3Transform::GetNRows() - 1; |
108615fc | 71 | const Int_t firstRow = seedRow-32; |
72 | for(Int_t n=0;n<ncluster;n++){ | |
73 | if(hits[n].fPadRow==seedRow) | |
74 | FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy seeds in 3D | |
75 | if(hits[n].fPadRow<=seedRow && hits[n].fPadRow>=firstRow) | |
76 | FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ); //copy data in 3D | |
77 | } | |
78 | } | |
79 | ||
80 | void AliL3VertexFinder::Analyze(){ | |
81 | FindSectorVertex(); | |
82 | SetZ(GetZSector()); | |
83 | SetZErr(GetZSectorErr()); | |
84 | LOG(AliL3Log::kInformational,"AliL3VertexFinder::Analyze","Result") | |
c31bdc3f | 85 | <<AliL3Log::kDec<<"Vertex: "<<GetZ()<<" RMS: "<<GetZErr()<<ENDLOG; |
108615fc | 86 | } |
87 | ||
88 | void AliL3VertexFinder::Write(AliL3Vertex *vertex){ | |
89 | vertex->SetX(GetX()); | |
90 | vertex->SetY(GetZ()); | |
91 | vertex->SetZ(GetZ()); | |
92 | vertex->SetXErr(GetXErr()); | |
93 | vertex->SetYErr(GetYErr()); | |
94 | vertex->SetZErr(GetZErr()); | |
95 | ||
96 | vertex->SetXYWeight(GetXYWeight()); | |
97 | } | |
98 | ||
99 | void AliL3VertexFinder::Write(AliL3VertexData *vertex){ | |
100 | vertex->fX=GetX(); | |
101 | vertex->fY=GetZ(); | |
102 | vertex->fZ=GetZ(); | |
103 | vertex->fXErr=GetXErr(); | |
104 | vertex->fYErr=GetYErr(); | |
105 | vertex->fZErr=GetZErr(); | |
106 | } |