PandaRoot
PndTrkLegendreTransform.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 
13 #ifndef PNDTRKLEGENDRETRANSFORM_H
14 #define PNDTRKLEGENDRETRANSFORM_H
15 
16 #include "TMath.h"
17 #include "TH2F.h"
18 
19 class PndTrkLegendreTransform : public TObject {
20 
21  public:
24 
25  void SetUpLegendreHisto();
26  void SetUpLegendreHisto(double thetaNofBin, double thetaMin, double thetaMax, double rNofBin, double rMin, double rMax);
27  void SetUpZoomHisto(double theta, double r, double deltatheta, double deltar);
28  void SetUpZoomHisto();
29 
30  void ResetLegendreHisto();
31  void ResetZoomHisto();
32 
33  void FillHisto(TH2F *histo, double thetamin, double thetamax, double x, double y, double radius);
34  void FillLegendreHisto(double x, double y, double radius);
35  void FillZoomHisto(double x, double y, double radius);
36 
37  /* void SetDeltaThetaSteppingRad(double deltathetarad) { fDeltaThetaRad = deltathetarad; } */
38  /* void SetDeltaThetaSteppingDeg(double deltathetadeg) { fDeltaThetaRad = TMath::DegToRad() * deltathetadeg; } */
39  void ApplyThresholdLegendreHisto(double threshold);
40 
41  int ExtractLegendreMaximum(double &theta_max, double &r_max);
42  void ExtractLegendreMaxima(int nmaxima, std::vector<double> &theta_max, std::vector<double> &r_max, std::vector<int> &content_max);
43  int ExtractZoomMaximum(double &theta_max, double &r_max);
44  int ExtractMaximumFromHisto(TH2F *histo, double &theta_max, double &r_max);
45  void ExtractMaximaFromHisto(int nmaxima, TH2F *histo, std::vector<double> &theta_max, std::vector<double> &r_max, std::vector<int> &content_max);
46 
47  void ExtractLineParameters(double theta, double r, double &slope, double &intercept);
48  void ExtractLegendreSingleLineParameters(double &slope, double &intercept);
49  void ExtractZoomSingleLineParameters(double &slope, double &intercept);
50 
51  void DeleteZoneAroundXYLegendre(double x, double y);
52  void DeleteZoneAroundXYZoom(double x, double y);
53  void DeleteZoneAroundXY(TH2F *histo, double x, double y);
54 
55  void Draw();
56  void DrawZoom();
57 
58  private:
59  Double_t fThetaNofBin, fThetaMin, fThetaMax, fRNofBin, fRMin, fRMax; //, fDeltaThetaRad;
60  Double_t fThetaMinZoom, fThetaMaxZoom, fRMinZoom, fRMaxZoom;
61  TH2F *fhLegendre, *fhLegendreZoom;
62  ClassDef(PndTrkLegendreTransform, 1)
63 };
64 
65 #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)