PandaRoot
PndSTETools.h
Go to the documentation of this file.
1 
11 #ifndef PndSTETools_H_
12 #define PndSTETools_H_
13 
14 #include "PndSTETrackBase.h"
15 #include "FairRootManager.h"
16 #include "FairMultiLinkedData.h"
17 #include "PndRiemannTrack.h"
18 #include "PndSdsHit.h"
19 #include "PndSTEDraw.h"
20 
21 class TClonesArray;
22 class FairMultiLinkedData;
23 
24 class PndSTETools : public PndSTETrackBase {
25 
26  public:
29 
31  virtual ~PndSTETools(){};
32 
38  double GetDistanceToTrack(PndRiemannTrack mvdRiemannTrack, PndSdsHit *mvdHit);
39 
45  double GetDistanceToTrackRiemannHit(PndRiemannTrack mvdRiemannTrack, PndRiemannHit hit);
46 
52  PndRiemannTrack CompareError(PndRiemannTrack oldRiemannTrack, PndRiemannTrack newRiemannTrack);
53 
58  bool NewTrackHasSmallestError() { return fNewTrack; };
59 
65  bool IsHitInTrack(PndSdsHit *mvdHit, PndTrackCand trackCand);
66 
71  void CalcSlope(PndTrack *track);
72 
76  double GetLineSlope() { return fLineSlope; }
77 
85  std::vector<PndSdsHit *> RefitRiemannTrack(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHits);
86 
88  void DrawTracks(bool val) { fDrawTrack = val; };
89 
94  void CalcChi2(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHitVector);
95 
100  void CalcChi2SZ(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHitVector);
101 
106  void CalcResidual(PndRiemannTrack track, std::vector<PndSdsHit *> mvdHitVec);
107 
114  bool IsHitInCorrectHemisphere(PndSdsHit *myHit, double xc, double lineSlope);
115 
116  private:
120  bool fNewTrack = false;
121 
122  bool fDrawTrack = false; // true if the tracks should be drawn, false otherwise
123 
124  ClassDef(PndSTETools, 1);
125 };
126 
127 #endif /*PndSTETools_H_*/
double GetDistanceToTrack(PndRiemannTrack mvdRiemannTrack, PndSdsHit *mvdHit)
A function that returns the distance between a MVD hit and the Riemann track.
PndRiemannTrack CompareError(PndRiemannTrack oldRiemannTrack, PndRiemannTrack newRiemannTrack)
Function to compare the error between two Riemann tracks between two steps of the iterations...
void CalcResidual(PndRiemannTrack track, std::vector< PndSdsHit *> mvdHitVec)
Function that calculates the residuals (distances) between the track and the hits in SZ space...
bool NewTrackHasSmallestError()
Funtion returning the value of fNewTrack. Can be used in other classes to determine which Riemann tra...
Definition: PndSTETools.h:58
virtual ~PndSTETools()
Definition: PndSTETools.h:31
void CalcChi2SZ(PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHitVector)
Function to calculate the chi2 of a Riemann track with MVD hits in SZ plane.
void DrawTracks(bool val)
Function for choosing to draw the tracks with hits.
Definition: PndSTETools.h:88
bool IsHitInCorrectHemisphere(PndSdsHit *myHit, double xc, double lineSlope)
Function to test if the MVD hit is in the same hemisphere as the Center-of-Gravity of the STT hits in...
bool IsHitInTrack(PndSdsHit *mvdHit, PndTrackCand trackCand)
Function to examine if a specific hit has already been included in a track.
void CalcSlope(PndTrack *track)
Function to calculate the slope of the line defining the hemisphere surface.
std::vector< PndSdsHit * > RefitRiemannTrack(PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHits)
Function that refits the Riemann track with a set of MVD hits.
double GetLineSlope()
Function returning the value of the line slope for a track.
Definition: PndSTETools.h:76
double GetDistanceToTrackRiemannHit(PndRiemannTrack mvdRiemannTrack, PndRiemannHit hit)
A function that returns the distance between a Riemann hit and the Riemann track. ...
void CalcChi2(PndRiemannTrack riemannTrack, std::vector< PndSdsHit *> mvdHitVector)
Function to calculate the chi2 of a Riemann track with MVD hits.