Commit b8992d03 authored by Federica Fabbri's avatar Federica Fabbri
Browse files

Added a control to ensure the cut on jets pT used to retrieve tracks is 5 GeV...

Added a control to ensure the cut on jets pT used to retrieve tracks is 5 GeV below the jet pt used in the analysis. Removed a wronk break in RCJetMC15.cxx. Used std::abs everywhere
parent 16ed79b8
......@@ -176,8 +176,8 @@ namespace top {
registerParameter("SaveFailForwardJVTJets", "Save the jets that failed the fJVT cut? \'False\' (default), or \'True\'", "False");
registerParameter("JetPtGhostTracks",
"Jet pT threshold for ghost track systematic variations calculation (in MeV). Default 30 GeV.",
"30000.");
"Jet pT threshold for ghost track systematic variations calculation (in MeV). Default 25 GeV.",
"25000.");
registerParameter("JetEtaGhostTracks",
"Jet eta threshold for ghost track systematic variations calculation. Default 2.5",
"2.5");
......
......@@ -1289,7 +1289,10 @@ namespace top {
// Jet configuration
this->jetPtcut(std::stof(settings->value("JetPt")));
this->jetEtacut(std::stof(settings->value("JetEta")));
this->jetPtGhostTracks(std::stof(settings->value("JetPtGhostTracks")));
this->jetPtGhostTracks(std::stof(settings->value("JetPtGhostTracks")),std::stof(settings->value("JetPt")));
if ( m_jetPtcut <= std::stof(settings->value("JetPtGhostTracks"))+5000){
ATH_MSG_WARNING("jetPtGhostTracks set to " << m_jetPtGhostTracks <<" to ensure that all the selected jets have the ghost tracks associated");
}
this->jetEtaGhostTracks(std::stof(settings->value("JetEtaGhostTracks")));
this->jetUncertainties_NPModel(settings->value("JetUncertainties_NPModel"));
this->jetUncertainties_QGFracFile(settings->value("JetUncertainties_QGFracFile"));
......
......@@ -1051,9 +1051,14 @@ namespace top {
}
}
inline virtual void jetPtGhostTracks(const float pt) {
if (!m_configFixed) {
m_jetPtGhostTracks = pt;
inline virtual void jetPtGhostTracks(const float pt, const float small_jet_pt) {
if (!m_configFixed) {
if ( small_jet_pt >= pt+4999){
m_jetPtGhostTracks = pt;
}
else {
m_jetPtGhostTracks = (small_jet_pt - 5000) > 20000 ? (small_jet_pt - 5000) : 20000;
}
}
}
......
......@@ -624,11 +624,10 @@ void RCJetMC15::getPflowConstituent(std::vector<fastjet::PseudoJet>& clusters, c
jetTracks.clear();
jetTracks = subjet_raw->getAssociatedObjects<xAOD::TrackParticle>(m_config->decoKeyJetGhostTrack(event.m_hashValue));
bool haveJetTracks = jetTracks.size() != 0;
if (haveJetTracks) {
for ( const xAOD::TrackParticle* jet: jetTracks ){
......@@ -648,8 +647,7 @@ void RCJetMC15::getPflowConstituent(std::vector<fastjet::PseudoJet>& clusters, c
}
} else {
ATH_MSG_WARNING(
"The link to the ghost matched tracks to the PFlow jets are missing, unable to calculate the substructure");
break;
}
"RCJETMC15::No remaining tracks associated to the PFlow jet");
}
}
}
......@@ -616,7 +616,7 @@ void TopObjectSelection::applySelectionPreOverlapRemovalJetGhostTracks() {
for (auto jetPtr : *jets)
{
if (std::fabs(jetPtr->eta()) > 2.5)
if (std::abs(jetPtr->eta()) > 2.5)
continue;
if (jetPtr->pt() < m_config->jetPtGhostTracks() )
continue;
......@@ -650,7 +650,6 @@ void TopObjectSelection::applySelectionPreOverlapRemovalJetGhostTracks() {
}
}
}
}
......@@ -996,11 +995,12 @@ void TopObjectSelection::applySelectionPreOverlapRemovalJetGhostTracks() {
"TopObjectSelection::applyOverlapRemovalPostSelection() failed to retrieve jets for ghost matching");
unsigned int index= -1;
for (const auto& jetPtr : *xaod_jet_ga){
index=index+1;
if (std::fabs(jetPtr->eta()) > 2.5)
if (std::abs(jetPtr->eta()) > 2.5)
continue;
if (jetPtr->pt() < m_config->jetPtGhostTracks() )
continue;
......
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