Study of the CMS Monte Carlo and Run open data for the dimuon system  1.0
A C++ software for the measurement of the Z resonance, the angle of the negative muon in the Collins–Soper frame of the dimuon system and the forward-backward asymmetry of Drell–Yan events in pp collisions at 8 TeV
graphicalUtilities.h File Reference

Graphical utilities for displaying histograms of Afb, Z spectrum, cos(theta*) and saving the plots. More...

#include <filesystem>
#include <iostream>
#include <string>
#include <TH2D.h>
#include <TPad.h>
#include <TVirtualPad.h>
#include <TH1D.h>
#include <ROOT/RDataFrame.hxx>
#include <ROOT/RResultPtr.hxx>
#include <ROOT/RVec.hxx>
#include <Math/Vector4Dfwd.h>
#include <Math/Vector4D.h>
#include <TCanvas.h>
#include <TLatex.h>
#include <TStyle.h>
#include <TROOT.h>
#include <TLegend.h>
Include dependency graph for graphicalUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void saveHistogram (TCanvas *c, string namehist, string type)
 
void cosHisto (ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_MC, ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_datas, string filename, string rapiditylim, float x1, float y1, float x2, float y2, string canvasname)
 
void dmMassHisto (ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_MC, ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_datas, string filename, string rapiditylim, string canvasname)
 
auto operationHist (ROOT::RDF::RResultPtr<::TH2D > &histNf, ROOT::RDF::RResultPtr<::TH2D > &histDf, ROOT::RDF::RResultPtr<::TH2D > &histNb, ROOT::RDF::RResultPtr<::TH2D > &histDb)
 
void afbHist (ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_MC, ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void > df_datas, int filenumber, string rapiditylim)
 

Detailed Description

Graphical utilities for displaying histograms of Afb, Z spectrum, cos(theta*) and saving the plots.

Function Documentation

◆ afbHist()

void afbHist ( ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_MC,
ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_datas,
int  filenumber,
string  rapiditylim 
)

creating Afb histogram

Parameters
df_MCdataframe of the MonteCarlo datas
df_datasdataframe of the RUN datas
filenumbernumber of the rapidity condition
rapiditylimlimit of rapidity to write on the canvas
Returns
None

◆ cosHisto()

void cosHisto ( ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_MC,
ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_datas,
string  filename,
string  rapiditylim,
float  x1,
float  y1,
float  x2,
float  y2,
string  canvasname 
)

creating cos(theta*) histogram and save

Parameters
df_MCdataframe of the MonteCarlo datas
df_datasdataframe of the Run datas
filenamename of the final file
rapiditylimlimit of rapidity to write on the canvas
x1low limit of x for the legend
y1low limit of y for the legend
x2up limit of x for the legend
y2up limit of y for the legend
canvasnamename of the canvas I create
Returns
None

◆ dmMassHisto()

void dmMassHisto ( ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_MC,
ROOT::RDF::RInterface< ROOT::Detail::RDF::RJittedFilter, void >  df_datas,
string  filename,
string  rapiditylim,
string  canvasname 
)

creating Z dimuon spectrum histogram and save

Parameters
df_MCdataframe of the MonteCarlo datas
df_datasdataframe of the Run datas
filenamename of the final file
rapiditylimlimit of rapidity to write on the canvas
canvasnamename of the canvas I create
Returns
None

◆ operationHist()

auto operationHist ( ROOT::RDF::RResultPtr<::TH2D > &  histNf,
ROOT::RDF::RResultPtr<::TH2D > &  histDf,
ROOT::RDF::RResultPtr<::TH2D > &  histNb,
ROOT::RDF::RResultPtr<::TH2D > &  histDb 
)

making sum, division and rescaling of an histogram

Parameters
histNf2D histogram of dimuon mass and rapidity, with costheta>0, weighted with wn
histDf2D histogram of dimuon mass and rapidity, with costheta>0, weighted with wd
histNb2D histogram of dimuon mass and rapidity, with costheta<0, weighted with wn
histDb2D histogram of dimuon mass and rapidity, with costheta<0, weighted with wd
Returns
rescaled histogram

◆ saveHistogram()

void saveHistogram ( TCanvas *  c,
string  namehist,
string  type 
)

Save histogram in pdf mode and png mode in the folder "images" and in the subfolder "images/type", if don't exist the program creates them

Parameters
cthe canvas I have to save
namehistname of the histogram
typename of the subfolder
Returns
None