StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StiVertexFinder.cxx
1 #include "Stiostream.h"
2 #include "StiVertexFinder.h"
3 #include "StiHit.h"
4 #include "StiToolkit.h"
5 static const double kBigErr2 = 100;
6 //______________________________________________________________________________
7 StiVertexFinder::StiVertexFinder(const string & name): Named(name)
8 {
9  _hitFactory= StiToolkit::instance()->getHitFactory();
10  cout <<"StiVertexFinder::StiVertexFinder() -I- Started :" << name<<endl;
11 }
12 
13 //______________________________________________________________________________
14 StiVertexFinder::~StiVertexFinder()
15 {}
16 //______________________________________________________________________________
17 const std::vector<StiHit* >* StiVertexFinder::result()
18 {
19 
20  _result.clear();
21  StiHit *hit=0;
22  for (int i=0;(hit=getVertex(i));i++) {
23  if (hit->sxx() > kBigErr2) continue;
24  if (hit->syy() > kBigErr2) continue;
25  if (hit->szz() > kBigErr2) continue;
26  _result.push_back(hit);
27  }
28  return &_result;
29 }
Definition: StiHit.h:51
Definition: Named.h:16
Float_t sxx() const
Return components of the error matrix.
Definition: StiHit.h:81
Abstract interface for a STI toolkit.