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
diffCrossSection.h File Reference

Function to calculate and plot the differential cross section for the Y(1S), Y(2S) and Y(3S) in trasverse momentum. More...

#include "ROOT/RDataFrame.hxx"
#include "TMath.h"
#include "RooFitResult.h"
#include <filesystem>
#include "TSystem.h"
#include "RooAbsPdf.h"
#include "Cuts.h"
#include "SpectrumPlot.h"
#include "fitRoo.h"
#include "optionParse.h"
#include "diffCrossSection.h"
#include "TApplication.h"
#include "TRootCanvas.h"
#include "TGraph.h"
#include "TLatex.h"
#include "TLegend.h"
#include "TGraphErrors.h"
#include "TMultiGraph.h"
#include "TROOT.h"

Go to the source code of this file.

Classes

struct  dcsbin
 Structure where are saved the value useful for each bin. More...
 

Functions

Double_t diffCrossSec (double N, float wpt)
 Calculate the differential cross section given the number of events under the peak of the Y resonance and the width of the \(p_T \) bin (wpt) More...
 
dcsbin setset (float ptm, float ptM, float ym, float yM, ROOT::RDF::RNode &df, std::string nameFile)
 Create a stucture where it save the edges of the bins and the cross section for each Y resonance. More...
 
void PlotDiffCrossSection (ROOT::RDF::RNode &df, float ym=std::nanf("1"), float yM=1.2, int cr=0)
 Plot the differential cross section calculate for each bin for the Y(1S), Y(2S) and Y(3S) as a function of the trasverse momentum. More...
 

Detailed Description

Function to calculate and plot the differential cross section for the Y(1S), Y(2S) and Y(3S) in trasverse momentum.

Function Documentation

◆ diffCrossSec()

Double_t diffCrossSec ( double  N,
float  wpt 
)

Calculate the differential cross section given the number of events under the peak of the Y resonance and the width of the \(p_T \) bin (wpt)

The equation used for calculating the different cross section

\[ \frac{d\sigma}{dp_t} = \frac{N}{L \Delta p_t e_{uu} e_{sg} e_{vp} A} \]

where \(N\) is a fit parameter that says how many events are under the signal function and \(\Delta p_T\) is the width of the bin in \(p_T\) (i.e. the width of cut on the trasverse momentum). The value of the acceptance A is fixed to 1, and the other values are some costants taken from the article "Measurements of the Υ(1S), Υ(2S), and Υ(3S) differential cross sections in pp collisions at √s = 7 TeV".

Parameters
Nnumber of event under the peak of the resonance
wptwidth of the bin
Returns
differential cross section (multiplied by the relative branching ratio)

◆ PlotDiffCrossSection()

void PlotDiffCrossSection ( ROOT::RDF::RNode &  df,
float  ym = std::nanf("1"),
float  yM = 1.2,
int  cr = 0 
)

Plot the differential cross section calculate for each bin for the Y(1S), Y(2S) and Y(3S) as a function of the trasverse momentum.

The edge of the bin are defined in two array, these are used for calculate the differential cross section in each bin. These are then plotted on the same canva.

Parameters
dfDataframe where the unselected data are stored
ymlower edge on absolute value of rapidity
yMupper edge on absolute value of rapidity
crcanvas flag: if on, do not display application

◆ setset()

dcsbin setset ( float  ptm,
float  ptM,
float  ym,
float  yM,
ROOT::RDF::RNode &  df,
std::string  nameFile 
)

Create a stucture where it save the edges of the bins and the cross section for each Y resonance.

This function select the data from the data frame df using the function Cuts() defined in Cuts.h. The cut on the trasverse momentum is given by the bin edges and the one on the rapidity is between \( -1.2\) and \(1.2\). The data are plotted and fitted using the function fitRoo defined in fitRoo.h. From the fit we can get the number of events under the peak of each Y resonance and using the function diffCrossSec, defined in diffCrossection.h, calculate the differential cross section for the bin. All the value useful for the plotting are save inside the structur returned.

Parameters
ptmlower edge of the bin
ptMupper edge of the bin
dfDataframe with all the data
namefilename of the plot saved
Returns
Structure where are saved the value usuful for the bin