EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FwdHoughTree.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FwdHoughTree.h
1 //
2 // AYK (ayk@bnl.gov)
3 //
4 // Hough transform track finder for STAR-specific forward tracker;
5 //
6 // Initial port from OLYMPUS sources: Oct'2015;
7 //
8 
9 #include <ayk.h>
10 #include <3d.h>
11 #include <KalmanNode.h>
12 
13 #include <HoughTree.h>
14 #include <FwdMatchCandidate.h>
15 #include <SensitiveVolume.h>
16 #include <FwdHoughNodeGroup.h>
17 
18 #ifndef _FWD_HOUGH_TREE_
19 #define _FWD_HOUGH_TREE_
20 
21 class TrKalmanNode;
22 class FwdTrackFinder;
23 
24 class FwdHoughTree : public HoughTree
25 {
26  public:
28 
29  // Get (presumably solenoidal) field Z-component at the IP;
30  double GetBzAtIP();
31 
32  void MappingCall(const double par[], t_hough_range id[]);
33 
34  // Yes, want some extra fields, as well as fitting method;
36  return new FwdMatchCandidate(this);
37  };
38  //void SeparateSiamTracks(MatchCandidate *match, unsigned minHitCount, std::vector<MatchCandidate*> *newMatches);
39  //void ResolveAmbiguities(MatchCandidate *match);
41  void FinalFit(MatchCandidate *match);
42  TrKalmanNode *GetKfNode(MatchCandidate *match, unsigned gr, unsigned mm);
43 
44  HoughNodeGroup *AllocateNodeGroup(unsigned id) { return new FwdHoughNodeGroup(id); };
45 
47  unsigned id, unsigned cdim, const double min[], const double max[],
48  const double gra[]);
49  FwdHoughNodeGroup *AddNodeGroup(TrKalmanNodeLocation *location, unsigned tmpl, bool cylindricalPreference,
50  const std::set<double> &xMin, const std::set<double> &xMax,
51  const std::set<double> &yMin, const std::set<double> &yMax,
52  const std::set<double> &rMin, const std::set<double> &rMax);
53 
55  return (gr < mGroups.size() ? dynamic_cast<FwdHoughNodeGroup*>(mGroups[gr]) : 0);
56  };
57 
58  void SetupTrackQualityIteration(unsigned qua);
59 
60  //void ResolveAmbiguityViaWorstHit() { mAmbiguityResolutionViaWorstHit = true; };
61 
62  private:
63  // Well, STAR magnetic field is virtually constant in the [RZ] range
64  // [0 .. 20cm, 0 .. 150cm] -> may clearly use global helix fit for
65  // preliminary track chi^2 evaluation and simplified fast KF fit for
66  // precise track parameter determination at the end; just need to know
67  // Z-component of the field;
68  double mBzAtIP; // solenoidal field Z-component at Z=0.0
69 
70  // Back-door pointer; FIXME: do it better;
72 
74 
75  // This part is shared between ResolveAmbiguity() and FinalFit();
76  bool SetupKalmanFilter(MatchCandidate *match);
77 
79 };
80 
81 #endif