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

Function for creating and setting up dataframe used in the analysis. More...

#include "ROOT/RDataFrame.hxx"
#include "ROOT/RVec.hxx"
#include "Math/Vector4Dfwd.h"
#include "Math/Vector4D.h"
#include "TMath.h"
#include "TFile.h"
#include <TSystem.h>
#include "df_set.h"
#include <filesystem>
#include "optionParse.h"

Go to the source code of this file.

Functions

ROOT::Math::PtEtaPhiMVector computeDiMuonFourVec (RVec< float > &pt, RVec< float > &eta, RVec< float > &phi, RVec< float > &mass, unsigned long &im0, unsigned long &im1)
 Calculate the four vector of a dimuon starting from pt, eta, phi and mass of muon pair. More...
 
float computeDiMuonInvariantMass (ROOT::Math::PtEtaPhiMVector &fourvec)
 Calculate the invariant mass of a dimuon Four Vector. More...
 
float computeDiMuonPT (ROOT::Math::PtEtaPhiMVector &fourvec)
 Calculate the transverse momentum of a dimuon Four Vector. More...
 
float computeDiMuonRapidity (ROOT::Math::PtEtaPhiMVector &fourvec)
 Calculate the rapidity \( \eta=\text{arctanh}(\beta) \) of a dimuon Four Vector. More...
 
float computeDiMuonBeta (ROOT::Math::PtEtaPhiMVector &fourvec)
 Calculate beta ( \(\frac{p_t}{E}\)) of a dimuon Four Vector. More...
 
ROOT::RDF::RNode df_set ()
 Define the dataframe used in the analysis or it creates it if it is not found. More...
 

Detailed Description

Function for creating and setting up dataframe used in the analysis.

In this file are defined the functions used in order to read the dataframe (or create it if it is not already there) and setting it up with useful variables.

Function Documentation

◆ computeDiMuonBeta()

float computeDiMuonBeta ( ROOT::Math::PtEtaPhiMVector &  fourvec)

Calculate beta ( \(\frac{p_t}{E}\)) of a dimuon Four Vector.

Parameters
fourvecfour vector of dimuon pair
Returns
beta of fourvector

◆ computeDiMuonFourVec()

ROOT::Math::PtEtaPhiMVector computeDiMuonFourVec ( RVec< float > &  pt,
RVec< float > &  eta,
RVec< float > &  phi,
RVec< float > &  mass,
unsigned long &  im0,
unsigned long &  im1 
)

Calculate the four vector of a dimuon starting from pt, eta, phi and mass of muon pair.

Create two four vectors of type PtEtaPhiM from the indeces im0 and im1, then add them two together

Parameters
pttransverse momentum
etapseudorapidity
phiazimuthal angle
massmass
im0index of first good muon
im1index of second good muon
Returns
PtEtaPhiMVector of dimuon pair

◆ computeDiMuonInvariantMass()

float computeDiMuonInvariantMass ( ROOT::Math::PtEtaPhiMVector &  fourvec)

Calculate the invariant mass of a dimuon Four Vector.

Parameters
fourvecfour vector of dimuon pair
Returns
invariant mass of fourvector

◆ computeDiMuonPT()

float computeDiMuonPT ( ROOT::Math::PtEtaPhiMVector &  fourvec)

Calculate the transverse momentum of a dimuon Four Vector.

Parameters
fourvecfour vector of dimuon pair
Returns
pt (transverse momentum)

◆ computeDiMuonRapidity()

float computeDiMuonRapidity ( ROOT::Math::PtEtaPhiMVector &  fourvec)

Calculate the rapidity \( \eta=\text{arctanh}(\beta) \) of a dimuon Four Vector.

Parameters
fourvecfour vector of dimuon pair
Returns
rapidity of fourvector

◆ df_set()

ROOT::RDF::RNode df_set ( )

Define the dataframe used in the analysis or it creates it if it is not found.

This function tries to open the file data.root in the folder Data. If the folder or the data do not exist, the function downloads the dataset from the CMS open data web page and save it in a file for further usage. Before saving the file, the dataset is filtered for good muons (as defined in the article) and new columns are defined in order to implement functionalities.

Returns
Filtered and shaped dataframe