PandaRoot
PndSTETools.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
23 #ifndef PndSTETools_H_
24 #define PndSTETools_H_
25 
26 #include "PndSTETrackBase.h"
27 #include "FairRootManager.h"
28 #include "FairMultiLinkedData.h"
29 #include "PndRiemannTrack.h"
30 #include "PndSdsHit.h"
31 #include "PndSTEDraw.h"
32 
33 class TClonesArray;
34 class FairMultiLinkedData;
35 
36 class PndSTETools : public PndSTETrackBase {
37 
38  public:
41 
43  virtual ~PndSTETools(){};
44 
50  double GetDistanceToTrack(PndRiemannTrack mvdRiemannTrack, PndSdsHit *mvdHit);
51 
57  double GetDistanceToTrackRiemannHit(PndRiemannTrack mvdRiemannTrack, PndRiemannHit hit);
58 
64  PndRiemannTrack CompareError(PndRiemannTrack oldRiemannTrack, PndRiemannTrack newRiemannTrack);
65 
70  bool NewTrackHasSmallestError() { return fNewTrack; };
71 
77  bool IsHitInTrack(PndSdsHit *mvdHit, PndTrackCand trackCand);
78 
83  void CalcSlope(PndTrack *track);
84 
88  double GetLineSlope() { return fLineSlope; }
89 
97  std::vector<PndSdsHit *> RefitRiemannTrack(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHits);
98 
100  void DrawTracks(bool val) { fDrawTrack = val; };
101 
106  void CalcChi2(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHitVector);
107 
112  void CalcChi2SZ(PndRiemannTrack riemannTrack, std::vector<PndSdsHit *> mvdHitVector);
113 
118  void CalcResidual(PndRiemannTrack track, std::vector<PndSdsHit *> mvdHitVec);
119 
126  bool IsHitInCorrectHemisphere(PndSdsHit *myHit, double xc, double lineSlope);
127 
128  private:
132  bool fNewTrack = false;
133 
134  bool fDrawTrack = false; // true if the tracks should be drawn, false otherwise
135 
136  ClassDef(PndSTETools, 1);
137 };
138 
139 #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:70
virtual ~PndSTETools()
Definition: PndSTETools.h:43
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:100
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:88
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.