![]() |
GRSISort "v4.1.1.0"
An extension of the ROOT analysis Framework
|
![]() |
#include <iostream>#include <iomanip>#include <vector>#include <string>#include <cassert>#include <fstream>#include "TFile.h"#include "TH2.h"#include "TH1.h"#include "TGraphErrors.h"#include "TMultiGraph.h"#include "TCanvas.h"#include "TLine.h"#include "TLegend.h"#include "Fit/Fitter.h"#include "TMatrixD.h"#include "TPaveText.h"#include "ArgParser.h"#include "TUserSettings.h"#include "TGriffinAngles.h"#include "TPeakFitter.h"#include "TRWPeak.h"#include "TRedirect.h"#include "TGRSIFunctions.h"
Include dependency graph for AngularCorrelations.cxx:Go to the source code of this file.
Classes | |
| class | Ac |
| struct | mixingResult |
Functions | |
| std::vector< double > | A2a4Method (TGraphErrors *data, TGraphErrors *z0, TGraphErrors *z2, TGraphErrors *z4) |
| TMultiGraph * | CreateMultigraph (TGraphErrors *data, TGraphErrors *fit) |
| std::tuple< double, double, int, int > | FindLimits (TGraph *redChi2Graph, double minChi2, int degreesOfFreedom) |
| double | GetYError (TGraphErrors *graph, const double &x) |
| int | main (int argc, char **argv) |
| mixingResult | MixingMethod (TGraphErrors *data, TGraphErrors *z0, TGraphErrors *z2, TGraphErrors *z4, int twoJhigh, int twoJmid, int twoJlow, double mixingAngleHighToMid, double mixingAngleMidToLow, int numberOfSteps, std::vector< double > &bestParameters, std::ofstream &logFile, const std::string &pdfFileName) |
| TMultiGraph * | PlotCanvas (TGraphErrors *data, TGraphErrors *fit, TGraphErrors *residual, const std::vector< double > ¶meters, const std::vector< double > &errors, const double &redChiSquare, const std::vector< const char * > &extraText={}) |
| bool | PlotMixingCanvas (std::vector< mixingResult > &spin, const size_t &index, const std::vector< double > &confidenceLevels, const std::vector< double > &spinLabel) |
| std::vector< double > A2a4Method | ( | TGraphErrors * | data, |
| TGraphErrors * | z0, | ||
| TGraphErrors * | z2, | ||
| TGraphErrors * | z4 ) |
This method does a free fit of a_0, a_2, and a_4 to get the best possible result. The resulting parameters do not necessarily correspond to a meaningful physical result.
Definition at line 1383 of file AngularCorrelations.cxx.
References TGRSIFunctions::LegendrePolynomial(), Ac::Np(), and PlotCanvas().
Referenced by main().
| TMultiGraph * CreateMultigraph | ( | TGraphErrors * | data, |
| TGraphErrors * | fit ) |
This function creates a multigraph from the data (black, with error bars) and the fit (red, as a filled curve)
Definition at line 907 of file AngularCorrelations.cxx.
| std::tuple< double, double, int, int > FindLimits | ( | TGraph * | redChi2Graph, |
| double | minChi2, | ||
| int | degreesOfFreedom ) |
calculates the limits for a graph of reduced chi squares using the provided minimum reduced chi square and degrees of freedom
Definition at line 1090 of file AngularCorrelations.cxx.
References DYELLOW, and RESET_COLOR.
Referenced by MixingMethod().
| double GetYError | ( | TGraphErrors * | graph, |
| const double & | x ) |
general function to get the error of a graph at point x (takes the maximum of the errors of the bracketing points)
Definition at line 39 of file AngularCorrelations.cxx.
Referenced by main(), and Ac::operator()().
| int main | ( | int | argc, |
| char ** | argv ) |
program to read in 2D matrices from AngularCorrelationHelper project and fit peaks to create angular correlation plots and to create chi-square plots
Definition at line 65 of file AngularCorrelations.cxx.
References A2a4Method(), TPeakFitter::AddPeak(), TSinglePeak::Area(), TSinglePeak::AreaErr(), bgHigh, bgLow, TRWPeak::Centroid(), TRWPeak::CentroidErr(), DRED, DYELLOW, TPeakFitter::Fit(), TSinglePeak::FWHM(), TSinglePeak::FWHMErr(), TPeakFitter::GetBackground(), TUserSettings::GetDouble(), TSinglePeak::GetFitFunction(), TSinglePeak::GetReducedChi2(), GetYError(), MixingMethod(), ArgParser::option(), ArgParser::parse(), PlotMixingCanvas(), and RESET_COLOR.
Referenced by GRootCanvas::ShowEditor().
| mixingResult MixingMethod | ( | TGraphErrors * | data, |
| TGraphErrors * | z0, | ||
| TGraphErrors * | z2, | ||
| TGraphErrors * | z4, | ||
| int | twoJhigh, | ||
| int | twoJmid, | ||
| int | twoJlow, | ||
| double | mixingAngleHighToMid, | ||
| double | mixingAngleMidToLow, | ||
| int | numberOfSteps, | ||
| std::vector< double > & | bestParameters, | ||
| std::ofstream & | logFile, | ||
| const std::string & | pdfFileName ) |
Definition at line 1149 of file AngularCorrelations.cxx.
References TGRSIFunctions::CalculateA2(), TGRSIFunctions::CalculateA4(), mixingResult::fDegreesOfFreedom, FindLimits(), mixingResult::fMixingAngles, mixingResult::fMixingAnglesHistogram, Ac::Np(), and PlotCanvas().
Referenced by main().
| TMultiGraph * PlotCanvas | ( | TGraphErrors * | data, |
| TGraphErrors * | fit, | ||
| TGraphErrors * | residual, | ||
| const std::vector< double > & | parameters, | ||
| const std::vector< double > & | errors, | ||
| const double & | redChiSquare, | ||
| const std::vector< const char * > & | extraText = {} ) |
This function plots the data with the fit and residuals on the currently active canvas.
Definition at line 935 of file AngularCorrelations.cxx.
Referenced by A2a4Method(), and MixingMethod().
| bool PlotMixingCanvas | ( | std::vector< mixingResult > & | spin, |
| const size_t & | index, | ||
| const std::vector< double > & | confidenceLevels, | ||
| const std::vector< double > & | spinLabel ) |
plots the selected index/mixing angle (should be 0 or 1) on the current canvas
Definition at line 1011 of file AngularCorrelations.cxx.
Referenced by main().