YCrossFit 1.0
A C++/ROOT Library for the analysis of the differential cross section of the Y(1S,2S,3S) resonances in two muons
SpectrumPlot.h File Reference

Function to plot the spectrum of the dataset which is currently used and create an histogram. More...

#include "ROOT/RDataFrame.hxx"
#include "TMath.h"
#include "TCanvas.h"
#include "TH1D.h"
#include "TLatex.h"
#include <filesystem>
#include "TStyle.h"
#include "optionParse.h"

Go to the source code of this file.

Functions

void SavePlot (TCanvas *c, TString namePlot)
 Save the plot created in the folder Plots. More...
 
TH1 * SpectrumPlot (ROOT::RDF::RNode &df_cut, std::string nameFile, int mr=0)
 Create histogram of currently used df, and plot the spectrum. More...
 

Detailed Description

Function to plot the spectrum of the dataset which is currently used and create an histogram.

Function Documentation

◆ SavePlot()

void SavePlot ( TCanvas *  c,
TString  namePlot 
)

Save the plot created in the folder Plots.

If the folder does not exits, it creates it.

Parameters
c1canvas containing the plot
nameFilename to give to the pdf

◆ SpectrumPlot()

TH1 * SpectrumPlot ( ROOT::RDF::RNode &  df_cut,
std::string  nameFile,
int  mr = 0 
)

Create histogram of currently used df, and plot the spectrum.

Parameters
df_cutDataframe containg the data
nameFilename to give to the pdf (a string "preliminary" is going to be added to the filename)
mrreference of mode. If fit mode is selected, display canvas.
Returns
histogram of the data