EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrKalmanNode.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrKalmanNode.h
1 //
2 // AYK (ayk@bnl.gov)
3 //
4 // Forward detector tracking application of the Kalman filter stuff;
5 // ported from HERMES/OLYMPUS sources; cleaned up 2014/10/17;
6 //
7 
8 #include <EicTrackingDigiHit.h>
9 
10 #include <KalmanFilter.h>
11 #include <TrKalmanNodeLocation.h>
12 
13 class SensitiveVolume;
14 class EicTrackingDigiHit;
15 struct t_particle_group;
16 
17 #ifndef _TR_KALMAN_NODE_
18 #define _TR_KALMAN_NODE_
19 
21 
22 class TrKalmanNode: public KalmanNode {
23  // NB: in particular want TrKalmanFilter class to be able to use
24  // protected members of KalmanNode class;
25  friend class TrKalmanFilter;
26 
27 public:
29 
30  // No validity check?;
31  void SetMomentum(double value) { mInversedMomentum = 1./value; };
32  double GetInversedMomentum() const { return mInversedMomentum; };
34 
35  int SetMeasurementNoise(KfMatrix *W) { V->CopyFrom(W); return 0; };
36  void InflateMeasurementNoise(double scale);
37 
38  // Get magnetic field on an XY-plane of this node (orthogonal to KF Z axis);
39  int GetMagneticField(double xy[2], TVector3 &B);
40 
41  // Assign hit pointer for this node;
42  void SetHit(EicTrackingDigiHit *hit) { mHit = hit; };
43  bool HasHit() const { return mHit; };
44 
45  double GetZ() const { return mZ; };
46 
47  void SetLocation(TrKalmanNodeLocation *location) { mLocation = location; };
49 
50  void SetActiveFlag(bool flag) { mActive = flag; };
51  bool IsActive() const { return mActive; };
52 
55 
56  //private:
57  // Inversed momentum;
58  double mInversedMomentum;
59 
61 
63 
65 
66  // If 'true', this node will be included in the linked list in kf->BuildNodeList();
67  bool mActive;
68 
70  return static_cast <TrKalmanNode *> (KalmanNode::GetPrev(fb));
71  };
73  return static_cast <TrKalmanNode *> (KalmanNode::GetNext(fb));
74  };
75 
76  int PerformRungeKuttaStep(KalmanFilter::Direction fb, double pout[], double rkd[5][5]);
77 };
78 
79 #endif