Namespace: Whtautau_tripleselection
-
namespace whtautau_tripleselection
Functions
-
auto compareForTriples(const ROOT::RVec<float> &lep1pt, const ROOT::RVec<float> &lep1iso, const ROOT::RVec<float> &lep2pt, const ROOT::RVec<float> &lep2iso)
Function used to sort three 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:
Isolation of the first particle
pt of the first particle
Isolation of the second particle
pt of the second particle
- Parameters:
lep1pt – [in]
ROOT::RVec<float>containing pts of the first particle.lep1iso – [in]
ROOT::RVec<float>containing isolations of the first particle.lep2pt – [in]
ROOT::RVec<float>containing pts of the second particle.lep2iso – [in]
ROOT::RVec<float>containing isolations of the second particle.
- Returns:
true or false based on the particle ordering.
-
ROOT::RDF::RNode buildgentriple(ROOT::RDF::RNode df, const std::string &recotriple, const std::string &genindex_particle1, const std::string &genindex_particle2, const std::string &genindex_particle3, const std::string &gentriple)
Function used to build a triple of GenParticles from the selected triple. This uses the references of the reco particles to the gen particles.
- Parameters:
df – the Dataframe
recotriple – the column containing the tripe 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
genindex_particle3 – the column containing the index of the GenParticle reference for the second pair particle
gentriple – name of the new column containing the Gentriple
- Returns:
a new Dataframe with the Gentriple column
-
ROOT::RDF::RNode buildtruegentriple(ROOT::RDF::RNode df, const std::string &statusflags, const std::string &status, const std::string &pdgids, const std::string &motherids, const std::string &pts, const std::string &gentriple, const int mother_pdgid_1, const int mother_pdgid_23, const int daughter_1_pdgid, const int daughter_2_pdgid, const int daughter_3_pdgid)
Function to get the true gen-level triple from the event. The triple is build by searching for the gen mother particles and the three 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
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)
gentriple – the output column containing the index of the two selected gen particles
mother_pdgid_1 – the PDGID of the mother particle of the first particle
mother_pdgid_23 – the PDGID of the mother particle of the second and third particle
daughter_1_pdgid – the PDGID of the first daughter particle
daughter_2_pdgid – the PDGID of the second daughter particle
daughter_3_pdgid – the PDGID of the third daughter particle
- Returns:
auto the new Dataframe with the genpair column
-
ROOT::RDF::RNode flagGoodTriples(ROOT::RDF::RNode df, const std::string &flagname, const std::string &triplename)
This function flags events, where a suitable particle triple is found. A triple is considered suitable, if a TripleSelectionAlgo (like whtautau_tripleselection::three_flavor::TripleSelectionAlgo) returns indices, that are not -1. Events, where any of the particle indices is -1 are vetoed by this filter.
- Parameters:
df – [in] The input dataframe.
flagname – [in] The name of the generated flag column.
triplename – [in] The name of the column containing the indices of the particles in the particle quantity vectors.
- Returns:
A dataframe with the new flag.
-
namespace ele_tautau
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_tautau)
Function used to select the lepton triple from the W boson and the Higgs boson decay.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the eletautau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
muon_pt
muon_eta
muon_phi
muon_mass
tau_mask containing the flags whether the tau is a good tau or not
muon_mask containing the flags whether the muons are a good muons or not
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau has to larger than this value
mindeltaR_tautau – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_tautau)
-
namespace eleelemu
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
Function used to select a triple from eleele+jets events to estimate the jet to mu fakerate.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the eleelemu triple selection these values are:
muon_pts
muon_etas
muon_phis
muon_masses
ele_mask containing the flags whether the ele is a good tau or not
muon_mask containing the flags whether the muons are a good muons or not
triplename – name of the new column containing the triple index
mindeltaR_lep1lep1 – the seperation between each lepton1 has to be larger than this value
mindeltaR_lep1lep2 – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
-
namespace elemutau
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep)
Function used to select the lepton triple from the W boson and the Higgs boson decay. Only triples are selected if the electron pt is larger than the pt of the muon. The electron is than assigned to the W boson.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the elemuTau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
electron_pt
electron_eta
electron_phi
electron_mass
muon_pt
muon_eta
muon_phi
muon_mass
electron_masks containing the flags whether the electron is a good electron or a base electron
tau_mask containing the flags whether the tau is a good tau or not
muon_masks containing the flags whether the muon is a good muon or a base muon
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau has to be larger than this value
mindeltaR_leplep – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelectionWOEle(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau)
Function used to select the lepton triple from the W boson and the Higgs boson decay. Only triples are selected if the electron pt is larger than the pt of the muon. The electron is than assigned to the W boson.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the elemuTau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
electron_pt
electron_eta
electron_phi
electron_mass
muon_pt
muon_eta
muon_phi
muon_mass
electron_masks containing the flags whether the electron is a good electron or a base electron
tau_mask containing the flags whether the tau is a good tau or not
muon_masks containing the flags whether the muon is a good muon or a base muon
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep)
-
namespace lep1lep1_lep2
Functions
-
auto TripleSelectionAlgo(const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
Implementation of the triple selection algorithm. First, only events that contain two good leptons lep1 and one loose lepton lep2 are considered. Events contain two good lep1 and one loose lep2, if the corresponding leptonmask have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin). The argument triple gives information wheather the emt or the met channel is considered.
- Returns:
an
ROOT::RVec<int>with three values, the first one beeing the lepton from the W index, the second one beeing the lepton from the tau index and the third one the hadronic tau index.
-
auto TripleSelectionAlgo(const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
-
namespace lep_tautau
Functions
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_tautau)
Implementation of the triple selection algorithm. First, only events that contain one good lepton and at least two good taus are considered. Events contain one good lepton and at least two good taus, if the tau_mask and the leptonmask have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin). The argument triple gives information wheather the emt or the met channel is considered.
- Returns:
an
ROOT::RVec<int>with three values, the first one beeing the lepton from the W index, the second one beeing the lepton from the tau index and the third one the hadronic tau index.
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_tautau)
-
namespace mu_tautau
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_tautau)
Function used to select the lepton triple from the W boson and the Higgs boson decay.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the mutauTau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
muon_pt
muon_eta
muon_phi
muon_mass
tau_mask containing the flags whether the tau is a good tau or not
muon_mask containing the flags whether the muons are a good muons or not
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau has to larger than this value
mindeltaR_tautau – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_tautau)
-
namespace mueletau
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep)
Function used to select the lepton triple from the W boson and the Higgs boson decay. Only triples are selected if the electron pt is larger than the pt of the muon. The electron is than assigned to the W boson.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the mueleTau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
electron_pt
electron_eta
electron_phi
electron_mass
muon_pt
muon_eta
muon_phi
muon_mass
electron_masks containing the flags whether the electron is a good electron or a base electron
tau_mask containing the flags whether the tau is a good tau or not
muon_masks containing the flags whether the muon is a good muon or a base muon
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau has to be larger than this value
mindeltaR_leplep – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep)
-
namespace mumuele
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
Function used to select a triple from mumu+jets events to estimate the jet to ele fakerate.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the mumuele triple selection these values are:
muon_pts
muon_etas
muon_phis
muon_masses
ele_mask containing the flags whether the ele is a good tau or not
muon_mask containing the flags whether the muons are a good muons or not
triplename – name of the new column containing the triple index
mindeltaR_lep1lep1 – the seperation between each lepton1 has to be larger than this value
mindeltaR_lep1lep2 – the seperation between the leptons has to be larger than this value
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_lep1lep1, const float &mindeltaR_lep1lep2)
-
namespace mumutau
Functions
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &ss_or_os)
Function used to select the lepton triple from the W boson and the Higgs boson decay. Only triples are selected if the electron pt is larger than the pt of the muon. The electron is than assigned to the W boson.
- Parameters:
df – the input dataframe
input_vector – vector of strings containing the columns needed for the alogrithm. For the mumuTau triple selection these values are:
tau_pt
tau_eta
tau_phi
tau_mass
muon_pt
muon_eta
muon_phi
muon_mass
tau_mask containing the flags whether the tau is a good tau or not
muon_mask containing the flags whether the muons are a good muons or not
triplename – name of the new column containing the triple index
mindeltaR_leptau – the seperation between each lepton and the tau this value
mindeltaR_leplep – the seperation between the leptons
ss_or_os – requirement of ss or os for the two muons (ss for analysis, os for FF estimation)
- Returns:
a new dataframe with the triple index column added
-
ROOT::RDF::RNode TripleSelection(ROOT::RDF::RNode df, const std::vector<std::string> &input_vector, const std::string &triplename, const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &ss_or_os)
-
namespace three_flavor
Functions
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &triple)
Implementation of the triple selection algorithm. First, only events that contain at least two goodleptons and one goodTau are considered. Events contain at least two good leptons and one good tau, if the the two leptonmasks have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin applied for pT). The argument triple gives information wheather the emt or the met channel is considered. Events with two good electrons or two good muons are vetos immediately. For the fake rate estimation, base leptons are also considered.
- Returns:
an
ROOT::RVec<int>with three values, the first one beeing the lepton from the W index, the second one beeing the lepton from the tau index and the third one the hadronic tau index.
-
auto TripleSelectionWithoutEleAlgo(const float &mindeltaR_leptau)
Implementation of the triple selection algorithm without considering electrons to compare the results of the emt channel with the higgs to tau tau algorithm (mt channel). First, only events that contain at least two goodleptons and one goodTau are considered. Events contain at least two good leptons and one good tau, if the tau_mask the two leptonmasks have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin). To estimate the jet to lepton fake rate, we select also events with base leptons
- Returns:
an
ROOT::RVec<int>with three values, the first one beeing the lepton from the W index, the second one beeing the lepton from the tau index and the third one the hadronic tau index.
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &triple)
-
namespace two_flavor
Functions
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &ss_or_os)
Implementation of the triple selection algorithm. First, only events that contain at least two goodleptons with same flavour and one goodTau are considered. Events contain at least two good leptons and one good tau, if the the leptonmask and the taumask have nonzero elements. These masks are constructed using the functions from the physicsobject namespace (e.g. physicsobject::CutMin). The argument triple gives information wheather the emt or the met channel is considered. To estimate the jet to lepton fake rate, we select also events with base leptons
- Returns:
an
ROOT::RVec<int>with three values, the first one beeing the lepton from the W index, the second one beeing the lepton from the tau index and the third one the hadronic tau index.
-
auto TripleSelectionAlgo(const float &mindeltaR_leptau, const float &mindeltaR_leplep, const std::string &ss_or_os)
-
auto compareForTriples(const ROOT::RVec<float> &lep1pt, const ROOT::RVec<float> &lep1iso, const ROOT::RVec<float> &lep2pt, const ROOT::RVec<float> &lep2iso)