PandaRoot
PndTrkLegendreTransform.h
Go to the documentation of this file.
1 #ifndef PNDTRKLEGENDRETRANSFORM_H
2 #define PNDTRKLEGENDRETRANSFORM_H
3 
4 #include "TMath.h"
5 #include "TH2F.h"
6 
7 class PndTrkLegendreTransform : public TObject {
8 
9  public:
12 
13  void SetUpLegendreHisto();
14  void SetUpLegendreHisto(double thetaNofBin, double thetaMin, double thetaMax, double rNofBin, double rMin, double rMax);
15  void SetUpZoomHisto(double theta, double r, double deltatheta, double deltar);
16  void SetUpZoomHisto();
17 
18  void ResetLegendreHisto();
19  void ResetZoomHisto();
20 
21  void FillHisto(TH2F *histo, double thetamin, double thetamax, double x, double y, double radius);
22  void FillLegendreHisto(double x, double y, double radius);
23  void FillZoomHisto(double x, double y, double radius);
24 
25  /* void SetDeltaThetaSteppingRad(double deltathetarad) { fDeltaThetaRad = deltathetarad; } */
26  /* void SetDeltaThetaSteppingDeg(double deltathetadeg) { fDeltaThetaRad = TMath::DegToRad() * deltathetadeg; } */
27  void ApplyThresholdLegendreHisto(double threshold);
28 
29  int ExtractLegendreMaximum(double &theta_max, double &r_max);
30  void ExtractLegendreMaxima(int nmaxima, std::vector<double> &theta_max, std::vector<double> &r_max, std::vector<int> &content_max);
31  int ExtractZoomMaximum(double &theta_max, double &r_max);
32  int ExtractMaximumFromHisto(TH2F *histo, double &theta_max, double &r_max);
33  void ExtractMaximaFromHisto(int nmaxima, TH2F *histo, std::vector<double> &theta_max, std::vector<double> &r_max, std::vector<int> &content_max);
34 
35  void ExtractLineParameters(double theta, double r, double &slope, double &intercept);
36  void ExtractLegendreSingleLineParameters(double &slope, double &intercept);
37  void ExtractZoomSingleLineParameters(double &slope, double &intercept);
38 
39  void DeleteZoneAroundXYLegendre(double x, double y);
40  void DeleteZoneAroundXYZoom(double x, double y);
41  void DeleteZoneAroundXY(TH2F *histo, double x, double y);
42 
43  void Draw();
44  void DrawZoom();
45 
46  private:
47  Double_t fThetaNofBin, fThetaMin, fThetaMax, fRNofBin, fRMin, fRMax; //, fDeltaThetaRad;
48  Double_t fThetaMinZoom, fThetaMaxZoom, fRMinZoom, fRMaxZoom;
49  TH2F *fhLegendre, *fhLegendreZoom;
50  ClassDef(PndTrkLegendreTransform, 1)
51 };
52 
53 #endif
void FillLegendreHisto(double x, double y, double radius)
void FillHisto(TH2F *histo, double thetamin, double thetamax, double x, double y, double radius)
void DeleteZoneAroundXYLegendre(double x, double y)
void ExtractMaximaFromHisto(int nmaxima, TH2F *histo, std::vector< double > &theta_max, std::vector< double > &r_max, std::vector< int > &content_max)
int ExtractLegendreMaximum(double &theta_max, double &r_max)
int ExtractZoomMaximum(double &theta_max, double &r_max)
void FillZoomHisto(double x, double y, double radius)
void ExtractLineParameters(double theta, double r, double &slope, double &intercept)
void ExtractLegendreSingleLineParameters(double &slope, double &intercept)
void DeleteZoneAroundXYZoom(double x, double y)
int ExtractMaximumFromHisto(TH2F *histo, double &theta_max, double &r_max)
void ApplyThresholdLegendreHisto(double threshold)
void ExtractZoomSingleLineParameters(double &slope, double &intercept)
void DeleteZoneAroundXY(TH2F *histo, double x, double y)
void ExtractLegendreMaxima(int nmaxima, std::vector< double > &theta_max, std::vector< double > &r_max, std::vector< int > &content_max)