Commit 205dbeef authored by Oliver Majersky's avatar Oliver Majersky
Browse files

Add object selection option for large-R jet mass (by default m > 0).

parent 14bae87b
......@@ -118,7 +118,9 @@ namespace top {
///-- Large R Jets --///
if (topConfig->useLargeRJets()) {// not doing JVT cut for large-R jets
objectSelection->largeJetSelection(new top::JetMC15(topConfig->largeRJetPtcut(), topConfig->largeRJetEtacut(),
objectSelection->largeJetSelection(new top::JetMC15(topConfig->largeRJetPtcut(),
topConfig->largeRJetEtacut(),
topConfig->largeRJetMasscut(),
false));
}
......
......@@ -241,6 +241,7 @@ namespace top {
registerParameter("bJSF", "Used for top mass analysis, default is 1.0", "1.0");
registerParameter("LargeRJetPt", "LargeRJet pT cut for object selection (in MeV). Default 150 GeV.", "150000.");
registerParameter("LargeRJetMass", "LargeRJet min. mass cut for object selection (in MeV).", "0");
registerParameter("LargeRJetEta", "Absolute large-R jet eta cut for object selection. Default 2.0.", "2.0");
registerParameter("LargeRJetSubstructureVariables",
"List of substructure variables stored in the output separated by commas. By default no variable is added to output.",
......
......@@ -282,6 +282,7 @@ namespace top {
m_ghostTracksQuality("TightPrimary"),
m_largeRJetPtcut(25000.),
m_largeRJetMasscut(0.),
m_largeRJetEtacut(2.5),
m_largeRJetUncertainties_NPModel("CategoryReduction"),
m_largeRJetUncertaintiesConfigDir("SetMe"),
......@@ -1371,6 +1372,7 @@ namespace top {
this->largeRJetPtcut(std::stof(settings->value("LargeRJetPt")));
this->largeRJetMasscut(std::stof(settings->value("LargeRJetMass")));
this->largeRJetEtacut(std::stof(settings->value("LargeRJetEta")));
......
......@@ -1182,6 +1182,12 @@ namespace top {
}
}
inline virtual void largeRJetMasscut(const float m) {
if (!m_configFixed) {
m_largeRJetMasscut = m;
}
}
inline virtual void largeRJetEtacut(const float eta) {
if (!m_configFixed) {
m_largeRJetEtacut = eta;
......@@ -1207,6 +1213,7 @@ namespace top {
}
inline virtual float largeRJetPtcut() const {return m_largeRJetPtcut;}
inline virtual float largeRJetMasscut() const {return m_largeRJetMasscut;}
inline virtual float largeRJetEtacut() const {return m_largeRJetEtacut;}
inline virtual const std::map<std::string,std::string> largeRJetSubstructureVariables() const {return m_largeRJetSubstructureVariables;}
inline virtual const std::string& largeRJetUncertainties_NPModel() const {return m_largeRJetUncertainties_NPModel;}
......@@ -2390,7 +2397,8 @@ namespace top {
std::string m_ghostTracksQuality;
// Large R jet configuration
float m_largeRJetPtcut; // large R jet object selection pT cut
float m_largeRJetPtcut; // large R jet object selection lower pT cut
float m_largeRJetMasscut; // large R jet object selection lower mass cut
float m_largeRJetEtacut; // large R jet object selection (abs) eta cut
std::map<std::string,std::string> m_largeRJetSubstructureVariables;
std::string m_largeRJetUncertainties_NPModel; //large R JES/(plus old JMS, JMR, JER) uncertainties configuration
......
......@@ -11,10 +11,13 @@
namespace top {
JetMC15::JetMC15(const double ptcut,
const double etamax,
const double minmass,
const bool doJVTCut):
m_ptcut(ptcut),
m_etamax(etamax),
m_masscut(minmass),
m_applyJVTCut(doJVTCut),
m_appyMassCut(minmass > 0.),
m_jvt_tool("JetJvtEfficiencyTool") {
top::check(m_jvt_tool.retrieve(),
"Failed to retrieve JVT tool");
......@@ -22,12 +25,12 @@ namespace top {
// This version of the constructor always perform JVT cut
JetMC15::JetMC15(const double ptcut,
const double etamax) : JetMC15::JetMC15(ptcut, etamax, true) {}
const double etamax) : JetMC15::JetMC15(ptcut, etamax, -1.0, true) {}
// DEPRECIATED - fwdJetSel string now defunct, keeping blank string input for backwards compatibility
JetMC15::JetMC15(const double ptcut,
const double etamax,
const std::string) : JetMC15::JetMC15(ptcut, etamax, true) {}
const std::string) : JetMC15::JetMC15(ptcut, etamax, -1.0, true) {}
// DEPRECATED - only kept for backward compatibility
JetMC15::JetMC15(const double ptcut,
......@@ -44,6 +47,10 @@ namespace top {
if (std::fabs(jet.eta()) > m_etamax) return false;
if (m_appyMassCut) {
if (jet.m() < m_masscut) return false;
}
jet.auxdecor<char>("good") = 1;
jet.auxdecor<char>("closeToLepton") = 0;
......@@ -54,5 +61,7 @@ namespace top {
os << "JetMC15\n"
<< " * pT > " << m_ptcut << "\n"
<< " * |eta| < " << m_etamax << "\n";
if (m_appyMassCut)
os << " * m > " << m_masscut << "\n";
}
} // namespace top
......@@ -24,9 +24,10 @@ namespace top {
*
* @param ptcut The minimum pT to accept good jets.
* @param etamax The maximum eta cut.
* @param minmass The minimum mass to accept good jets.
* @param doJVTCut To perform JVT cut - should be false for small-R jets
*/
JetMC15(const double ptcut, const double etamax, const bool doJVTCut);
JetMC15(const double ptcut, const double etamax, const double minmass, const bool doJVTCut);
/**
* @brief A tool to select some jets for MC15 based on the pT and eta cuts.
......@@ -83,9 +84,16 @@ namespace top {
// The upper eta cut.
double m_etamax;
// The lower mass cut threshold to apply on the object.
// if negative, do not apply mass cut
double m_masscut;
// To do JVT cut - should be false for large-R jets
bool m_applyJVTCut;
// Whether minimum mass cut should be applied
bool m_appyMassCut;
ToolHandle<CP::IJetJvtEfficiency> m_jvt_tool;
};
} // namespace top
......
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