ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ThreeHitSeedGrower.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ThreeHitSeedGrower.h
1 #ifndef __THREEHITSEEDGROWER__
2 #define __THREEHITSEEDGROWER__
3 
4 #include "HelixHough.h"
5 #include <vector>
6 #include <set>
7 
9 {
10  public:
11  ThreeHitSeedGrower(std::vector<float>& detrad, unsigned int n_phi, unsigned int n_d, unsigned int n_k, unsigned int n_dzdl, unsigned int n_z0, HelixResolution& min_resolution, HelixResolution& max_resolution, HelixRange& range);
12  virtual ~ThreeHitSeedGrower(){}
13 
14 
15  bool GrowTrack(SimpleTrack3D seed_track, std::vector<unsigned int>& nhit_layer, std::vector<SimpleHit3D>& hits, std::vector<SimpleTrack3D>& tracks, unsigned int c_hit);
16  bool addOneHit(SimpleTrack3D & seed_track, std::vector<unsigned int> & nhit_layer, unsigned int c_hit, std::vector<SimpleHit3D>& hits);
17  void finalize(std::vector<SimpleTrack3D>& input, std::vector<SimpleTrack3D>& output);
18  void findTracks(std::vector<SimpleHit3D>& hits, std::vector<SimpleTrack3D>& tracks);
19  void initEvent(std::vector<SimpleHit3D>& hits)
20  {
21  combos.clear();
22  }
23 
24  void setUsingVertex(bool usevtx){using_vertex = usevtx;}
25 
26  void setMaxHits(unsigned int max_hits){_max_hits = max_hits;}
27 
28  void setLayerResolution(std::vector<float>& lxy, std::vector<float>& lz)
29  {
30  layer_xy_resolution = lxy;
31  layer_z_resolution = lz;
32  }
33 
34  void setVertexResolution(float vxy, float vz)
35  {
36  vertex_sigma_xy = vxy;
37  vertex_sigma_z = vz;
38  }
39 
40  double fitTrack(SimpleTrack3D & track, std::vector<double>& chi2_hit);
41 
42  void setChi2Cut(double c){chi2_cut=c;}
43 
44  private:
46  std::vector<float> detector_radii;
47  std::vector<float> layer_xy_resolution;
48  std::vector<float> layer_z_resolution;
50  double chi2_cut;
51  unsigned int _max_hits;
52  std::set<std::vector<unsigned int> > combos;
53 };
54 
55 
56 #endif