Commit 1086a378 authored by Tomas Dado's avatar Tomas Dado
Browse files

Added option to filter nominal_Loose tree branches from the default output

parent ff18aab8
......@@ -5529,6 +5529,7 @@ namespace top {
std::vector<std::string> filteredBranches;
if(treeManager->name() == "truth") filteredBranches= m_config->filterPartonLevelBranches();
else if(treeManager->name() == "particleLevel") filteredBranches= m_config->filterParticleLevelBranches();
else if(treeManager->name() == "nominal_Loose") filteredBranches= m_config->filterNominalLooseBranches();
else filteredBranches= m_config->filterBranches();
// lambda to test a wildcard on the variable
......
......@@ -376,6 +376,8 @@ namespace top {
"Comma separated list of names of the parton-level branches that will be removed from the output", " ");
registerParameter("FilterParticleLevelBranches",
"Comma separated list of names of the particle-level branches that will be removed from the output", " ");
registerParameter("FilterNominalLooseBranches",
"Comma separated list of names of the nominal_Loose tree branches that will be removed from the output", " ");
registerParameter("FilterTrees",
"Comma separated list of names of the trees that will be removed from the output", " ");
......
......@@ -1000,6 +1000,17 @@ namespace top {
this->setFilterParticleLevelBranches(branches);
}
// Get list of nominal_Loose branches to be filtered
if (settings->value("FilterNominalLooseBranches") != " ") {
std::vector<std::string> branches;
tokenize(settings->value("FilterNominalLooseBranches"), branches, ",");
if (branches.size() == 0) {
ATH_MSG_WARNING("You provided \"FilterNominalLooseBranches\" option but you did not provide any meaningful values. Ignoring");
}
this->setFilterNominalLooseBranches(branches);
}
// Force recomputation of CP variables?
if (settings->value("RecomputeCPVariables") == "False") m_recomputeCPvars = false;
......
......@@ -146,6 +146,14 @@ namespace top {
}
}
// List of NominalLoose branches to be removed
inline std::vector<std::string> filterNominalLooseBranches() const {return m_filterNominalLooseBranches;}
inline void setFilterNominalLooseBranches(const std::vector<std::string>& value) {
if (!m_configFixed) {
m_filterNominalLooseBranches = value;
}
}
// Generators name
inline std::string getGenerators() const {return m_generators;}
inline void setGenerators(const std::string value) {
......@@ -2045,7 +2053,7 @@ namespace top {
bool m_isMC;
bool m_isAFII;
std::vector<std::string> m_filterBranches, m_filterPartonLevelBranches, m_filterParticleLevelBranches;
std::vector<std::string> m_filterBranches, m_filterPartonLevelBranches, m_filterParticleLevelBranches, m_filterNominalLooseBranches;
std::string m_generators;
std::string m_AMITag;
bool m_isPrimaryxAOD;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment