Commit 6714eb18 authored by Nils Erik Krumnack's avatar Nils Erik Krumnack
Browse files

Merge branch '21.2-AT-CustomMuonSFFolder' into '21.2'

AnalysisTop: Adding option to set a custom Muon SF input folder

See merge request !46312
parents 3d1980d1 8556bddd
......@@ -285,6 +285,11 @@ namespace top {
"Failed to set WP for " + name + " tool");
top::check(asg::setProperty(tool, "CloseJetDRDecorator", "dRMuJet_AT_usingWeirdNameToAvoidUsingOnTheFlyCalculation"),
"Failed to set WP for " + name + " tool"); //in this way we'll only read the dR(mu,jet) from the derivation, IF the variable is there, but we'll not use on-the-fly calculation, which is tricky in AT
if (m_config->muonSFCustomInputFolder() != " ") {
top::check(asg::setProperty(tool, "CustomInputFolder", m_config->muonSFCustomInputFolder()),
"Failed to set CustomInputFolder property for MuonEfficiencyScaleFactors tool");
}
top::check(tool->initialize(),
"Failed to set initialize " + name);
}
......
......@@ -180,6 +180,10 @@ namespace top {
"Debug output for soft muon additional truth-level information: True or False (default)",
"False");
registerParameter("MuonSFCustomInputFolder",
"EXPERT OPTION! Tells the MuonEfficiencyScaleFactors tools to use a custom input folder path. If set to \" \" will use the default",
" ");
registerParameter("JetPt", "Jet pT cut for object selection (in MeV). Default 25 GeV.", "25000.");
registerParameter("JetEta", "Absolute Jet eta cut for object selection. Default 2.5.", "2.5");
......
......@@ -250,6 +250,7 @@ namespace top {
m_muonIsolationSFLoose("SetMe"),
m_muonMuonDoSmearing2stationHighPt(true),
m_muonMuonDoExtraSmearingHighPt(false),
m_muonSFCustomInputFolder(" "),
// Soft Muon configuration
m_softmuonPtcut(4000.),
......@@ -1330,6 +1331,10 @@ namespace top {
muonDoExtraSmearingHighPt = false;
}
this->muonMuonDoExtraSmearingHighPt( muonDoExtraSmearingHighPt );
{
std::string const& customMuonSF = settings->value("MuonSFCustomInputFolder");
this->muonSFCustomInputFolder(customMuonSF);
}
if (settings->value("UseAntiMuons") == "True") this->m_useAntiMuons = true;
......
......@@ -1044,25 +1044,25 @@ namespace top {
void muonUseMVALowPt(const bool& UseMVALowPt) {
if (!m_configFixed) {
m_muonUseMVALowPt = UseMVALowPt;
m_muonUseMVALowPt = UseMVALowPt;
}
}
void muonUse2stationMuonsHighPt(const bool& Use2stationMuonsHighPt) {
if (!m_configFixed) {
m_muonUse2stationMuonsHighPt = Use2stationMuonsHighPt;
m_muonUse2stationMuonsHighPt = Use2stationMuonsHighPt;
}
}
void muonUseMVALowPtLoose(const bool& UseMVALowPtLoose) {
if (!m_configFixed) {
m_muonUseMVALowPtLoose = UseMVALowPtLoose;
m_muonUseMVALowPtLoose = UseMVALowPtLoose;
}
}
void muonUse2stationMuonsHighPtLoose(const bool& Use2stationMuonsHighPtLoose) {
if (!m_configFixed) {
m_muonUse2stationMuonsHighPtLoose = Use2stationMuonsHighPtLoose;
m_muonUse2stationMuonsHighPtLoose = Use2stationMuonsHighPtLoose;
}
}
......@@ -1098,13 +1098,13 @@ namespace top {
void muonMuonDoSmearing2stationHighPt(const bool& MuonDoSmearing2stationHighPt) {
if (!m_configFixed) {
m_muonMuonDoSmearing2stationHighPt = MuonDoSmearing2stationHighPt;
m_muonMuonDoSmearing2stationHighPt = MuonDoSmearing2stationHighPt;
}
}
void muonMuonDoExtraSmearingHighPt(const bool& MuonDoExtraSmearingHighPt) {
if (!m_configFixed) {
m_muonMuonDoExtraSmearingHighPt = MuonDoExtraSmearingHighPt;
m_muonMuonDoExtraSmearingHighPt = MuonDoExtraSmearingHighPt;
}
}
......@@ -1123,6 +1123,13 @@ namespace top {
inline virtual bool muonMuonDoSmearing2stationHighPt() const {return m_muonMuonDoSmearing2stationHighPt;}
inline virtual bool muonMuonDoExtraSmearingHighPt() const {return m_muonMuonDoExtraSmearingHighPt;}
std::string const& muonSFCustomInputFolder() const {return m_muonSFCustomInputFolder;}
void muonSFCustomInputFolder(const std::string& s) {
if (!m_configFixed) {
m_muonSFCustomInputFolder = s;
}
}
// Soft Muon configuration
inline virtual void softmuonPtcut(const float pt) {
if (!m_configFixed) {
......@@ -2488,6 +2495,7 @@ namespace top {
float m_muon_delta_z0;
bool m_muonMuonDoSmearing2stationHighPt; //to turn on/off special correction for the reco with 2-station muons with missing inner MS station allowed for abs(eta)<1.3, only HighPt WP
bool m_muonMuonDoExtraSmearingHighPt; //to turn on/off a special correction for the muon with high momenta.
std::string m_muonSFCustomInputFolder;
//Soft muon configuration
float m_softmuonPtcut; // soft muon object selection pT cut
......
Markdown is supported
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