Namespace: Ditau_pairselection

namespace ditau_pairselection

Functions

ROOT::RDF::RNode buildgenpair(ROOT::RDF::RNode df, const std::string &outputname, const std::string &recopair, const std::string &genindex_particle1, const std::string &genindex_particle2)

Function used to build a pair of GenParticles from the selected DiTauPair. This uses the references of the reco particles to the gen particles.

Parameters:
  • df – the Dataframe

  • outputname – name of the new column containing the GenDiTauPair

  • recopair – the column containing the DiTauPair vector

  • genindex_particle1 – the column containing the index of the GenParticle reference for the first pair particle

  • genindex_particle2 – the column containing the index of the GenParticle reference for the second pair particle

Returns:

a new Dataframe with the GenDiTauPair column

ROOT::RDF::RNode buildtruegenpair(ROOT::RDF::RNode df, const std::string &outputname, const std::string &statusflags, const std::string &status, const std::string &pdgids, const std::string &motherids, const std::string &pts, const int mother_pdgid, const int daughter_1_pdgid, const int daughter_2_pdgid)

Function to get the true gen-level di-tau pair from the event. The pair is build by searching for the gen mother particle and the two requested daughter particles. For each stable daughter particle found in the collection of gen particles, it is checked if the particle is a daughter of the requested mother particle.

Parameters:
  • df – the Dataframe

  • outputname – name of the new column containing the index of the two selected gen particles

  • statusflags – the column containing the status flags of the gen particles

  • status – the column containing the status of the genparticles (status=1 means stable)

  • pdgids – the column containing the PDGID of the gen particles

  • motherids – the column containing the index of the mother particle of the gen particles

  • pts – the column containing the pt of the gen particles (used for sorting the particles by pt)

  • mother_pdgid – the PDGID of the mother particle

  • daughter_1_pdgid – the PDGID of the first daughter particle

  • daughter_2_pdgid – the PDGID of the second daughter particle

Returns:

auto the new Dataframe with the genpair column

ROOT::RDF::RNode flagGoodPairs(ROOT::RDF::RNode df, const std::string &flagname, const std::string &pairname)

This function flags events, where a suitable particle pair is found. A pair is considered suitable, if a PairSelectionAlgo (like ditau_pairselection::mutau::PairSelectionAlgo) returns indices, that are not -1. Events, where any of the particle indices is -1 are vetoed by this filter.

Parameters:
  • df – The input dataframe

  • flagname – The name of the generated flag column

  • pairname – The name of the column, containing the indices of the particles in the particle quantity vectors.

Returns:

a dataframe with the new flag

auto compareForPairs(const ROOT::RVec<float> &lep1pt, const ROOT::RVec<float> &lep1iso, const ROOT::RVec<float> &lep2pt, const ROOT::RVec<float> &lep2iso)

Function used to sort two particles based on the isolation and the pt of the two particles. The function is used as the ordering function for the ROOT::VecOps::Sort() algorithm. If two quantities are the same within a given epsilon of 1e-5, the next criterion is applied. The sorting is done using the following criterion odering:

  1. Isolation of the first particle

  2. pt of the first particle

  3. Isolation of the second particle

  4. pt of the second particle

Parameters:
  • lep1ptROOT::RVec<float> containing pts of the first particle

  • lep1isoROOT::RVec<float> containing isolations of the first particle

  • lep2ptROOT::RVec<float> containing pts of the second particle

  • lep2isoROOT::RVec<float> containing isolations of the second particle

Returns:

true or false based on the particle ordering.

namespace elel

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons with the highest pt.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

ROOT::RDF::RNode ZBosonPairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons closest to the Z mass.

Parameters:
  • df – the input dataframe

  • input_vector – . For the Z boson muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

namespace elmu

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of tau leptons based on the standard pair selection algorithm.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the ElTau pair selection these values are:

    • electron_pt

    • electron_eta

    • electron_phi

    • electron_mass

    • electron_iso

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_iso

    • electron_mask containing the flags whether the electron is a good electron or not

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the electron and the muon has to be larger than this value

Returns:

a new dataframe with the pair index column added

namespace eltau

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of tau leptons based on the standard pair selection algorithm.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the ElTau pair selection these values are:

    • tau_pt

    • tau_eta

    • tau_phi

    • tau_mass

    • tau_iso

    • electron_pt

    • electron_eta

    • electron_phi

    • electron_mass

    • electron_iso

    • electron_mask containing the flags whether the electron is a good electron

    • tau_mask containing the flags whether the tau is a good tau or not or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the electron at the tau has to be larger than this value

Returns:

a new dataframe with the pair index column added

namespace fullhadronic

Functions

auto PairSelectionAlgo(const float &mindeltaR)

Implementation of the ditau pair selection algorithm for the fullhadronic channel. First, only events that contain two goodTaus are considered. Events contain at two good tau, if the tau_mask has at least two nonzero elemts. These mask is contructed constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin applied for pT).

Returns:

an ROOT::RVec<int> with two values, the first one beeing the leading tau index and the second one beeing trailing tau index.

namespace leptonic

Functions

auto ElMuPairSelectionAlgo(const float &mindeltaR)

Implementation of the pair selection algorithm. First, only events that contain at least one goodElectron and one goodMuon are considered. Events contain at least one good Electron and one good Muon, if the electron_mask and the moun_mask both have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin applied for pT).

Returns:

an ROOT::RVec<int> with two values, the first one beeing the electron index and the second one beeing the muon index.

auto PairSelectionAlgo(const float &mindeltaR)

Lambda function containg the algorithm to select the pair of leptons with the highest pt.

Parameters:

mindeltaR – the seperation between the two leptons has to be larger than this value

Returns:

vector with two entries, the first entry is the leading lepton index, the second entry is the trailing lepton index

auto PairSelectionAlgoOSPreferred(const float &mindeltaR)

Lambda function containg the algorithm to select the pair of leptons with the highest pt giving a preference to OS pairs first.

Parameters:

mindeltaR – the seperation between the two leptons has to be larger than this value

Returns:

vector with two entries, the first entry is the leading lepton index, the second entry is the trailing lepton index

auto ZBosonPairSelectionAlgo(const float &mindeltaR)

Lambda function containg the algorithm to select the pair of leptons closest to the Z mass.

Parameters:

mindeltaR – the seperation between the two leptons has to be larger than this value

Returns:

vector with two entries, the first entry is the leading lepton index, the second entry is the trailing lepton index

auto ZBosonPairSelectionAlgoOSPreferred(const float &mindeltaR)

Lambda function containg the algorithm to select the pair of leptons closest to the Z mass giving a preference to OS pairs first.

Parameters:

mindeltaR – the seperation between the two leptons has to be larger than this value

Returns:

vector with two entries, the first entry is the leading lepton index, the second entry is the trailing lepton index

namespace mumu

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons with the highest pt.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

ROOT::RDF::RNode PairSelectionOSPreferred(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons with the highest pt giving a preference to OS pairs first.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

ROOT::RDF::RNode ZBosonPairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons closest to the Z mass.

Parameters:
  • df – the input dataframe

  • input_vector – . For the Z boson muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

ROOT::RDF::RNode ZBosonPairSelectionOSPreferred(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of muons closest to the Z mass giving a preference to OS pairs first.

Parameters:
  • df – the input dataframe

  • input_vector – . For the Z boson muon pair selection the required parameters are:

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_mask containing the flags whether the muon is a good muon or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two muons has to be larger than this value

Returns:

a new dataframe with the pair index column added

namespace mutau

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of tau leptons based on the standard pair selection algorithm.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the muTau pair selection these values are:

    • tau_pt

    • tau_eta

    • tau_phi

    • tau_mass

    • tau_iso

    • muon_pt

    • muon_eta

    • muon_phi

    • muon_mass

    • muon_iso

    • muon_mask containing the flags whether the muon is a good muon or not

    • tau_mask containing the flags whether the tau is a good tau or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the muon at the tau has to be larger than this value

Returns:

a new dataframe with the pair index column added

namespace semileptonic

namespace for semileptonic pair selection

Functions

auto PairSelectionAlgo(const float &mindeltaR)

Implementation of the pair selection algorithm. First, only events that contain at least one goodlepton and one goodTau are considered. Events contain at least one good lepton and one good tau, if the tau_mask and the mounmask both have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin applied for pT).

Returns:

an ROOT::RVec<int> with two values, the first one beeing the lepton index and the second one beeing the tau index.

namespace tautau

Functions

ROOT::RDF::RNode PairSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &pairname, const float &mindeltaR)

Function used to select the pair of tau leptons based on the standard pair selection algorithm.

Parameters:
  • df – the input dataframe

  • input_vector – vector of strings containing the columns needed for the alogrithm. For the TauTau pair selection these values are:

    • tau_pt

    • tau_eta

    • tau_phi

    • tau_mass

    • tau_iso

    • tau_mask containing the flags whether the tau is a good tau or not

  • pairname – name of the new column containing the pair index

  • mindeltaR – the seperation between the two tau candidates has to be larger than this value

Returns:

a new dataframe with the pair index column added