EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTpcTrackFollower.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTpcTrackFollower.h
1 
7 #ifndef PHTPCTRACKFOLLOWER_H_
8 #define PHTPCTRACKFOLLOWER_H_
9 
10 #include <TVector3.h> // for TVector3
11 
12 #include <utility> // for pair
13 #include <vector> // for vector
14 
15 class PHField;
16 class PHTpcLookup;
18 
19 namespace PHGenFit
20 {
21  class SpacepointMeasurement2;
22 }
23 namespace PHGenFit2
24 {
25  class Fitter;
26 }
27 namespace PHGenFit2
28 {
29  class Track;
30 }
31 namespace genfit
32 {
33  class MeasuredStateOnPlane;
34 }
35 namespace genfit
36 {
37  class Track;
38 }
39 namespace kdfinder
40 {
41  template <class T>
42  class TrackCandidate;
43 }
44 
50 {
51  public:
53  virtual ~PHTpcTrackFollower() {}
54 
55  std::vector<PHGenFit2::Track*> followTracks(std::vector<kdfinder::TrackCandidate<double>*>& candidates,
56  PHField* B, PHTpcLookup* lookup, PHGenFit2::Fitter* fitter);
57 
59  PHTpcLookup* lookup, PHGenFit2::Fitter* fitter);
60 
61  void set_optimization_helix(bool opt = true) { mOptHelix = opt; }
62  void set_optimization_precise_fit(bool opt = true) { mOptPreciseFit = opt; }
63 
64  protected:
66  PHGenFit::SpacepointMeasurement2* hit_to_measurement(std::vector<double>& hit);
67  int get_track_layer(PHGenFit2::Track* track, int dir = 1);
68  int get_track_layer(genfit::Track* gftrack, int dir = 1);
69  std::pair<genfit::MeasuredStateOnPlane*, double> get_projected_coordinate(genfit::Track* gftrack, int dir, double radius);
70  std::pair<genfit::MeasuredStateOnPlane*, double> get_projected_coordinate(genfit::Track* gftrack, int dir, const TVector3& point);
71  int followTrack(PHGenFit2::Track* track, PHTpcLookup* lookup, PHGenFit2::Fitter* fitter, int dir = 1);
72 
73  private:
74  bool mOptHelix;
76 };
77 
78 #endif /* PHTPCTRACKFOLLOWER_H_ */