diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MissingETObjectCollectionMaker.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MissingETObjectCollectionMaker.cxx index afb05d0ca1953ea6b4165db46998c292d63b4fa0..2e80ed78d4290ec81ee50405b18435ebb3b2c905 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MissingETObjectCollectionMaker.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MissingETObjectCollectionMaker.cxx @@ -127,7 +127,8 @@ namespace top { const std::string& outputContainerSuffix) { // decoration for objects that pass pre OR selection std::string passPreORSelection = "passPreORSelection"; - const std::string jet_collection = m_config->sgKeyJets(); + std::string jet_collection = m_config->sgKeyJets(); + jet_collection.erase(jet_collection.length() - 4); //erase "Jets" from jet collection name const bool is_loose_event = (event->isLooseEvent() == 1 ? true : false); @@ -278,13 +279,13 @@ namespace top { // https://svnweb.cern.ch/trac/atlasoff/browser/Reconstruction/MET/METUtilities/tags/METUtilities-00-01-43/util/example_METMaker_METSystematicsTool.cxx //get the soft cluster term, and applyCorrection - xAOD::MissingET* softClusMet = (*new_met_container)["SoftClus"]; + xAOD::MissingET* softClusMet = (*new_met_container)["SoftClusCore"]; if (softClusMet != nullptr) { //check we retrieved the clust term m_met_systematics->setRandomSeed(static_cast<int>(1e6*softClusMet->phi())); top::check(m_met_systematics->applyCorrection(*softClusMet), "Failed to applyCorrection"); } - xAOD::MissingET* softTrkMet = (*new_met_container)["PVSoftTrk"]; + xAOD::MissingET* softTrkMet = (*new_met_container)["PVSoftTrkCore"]; if (softTrkMet != nullptr) { //check we retrieved the soft trk m_met_systematics->setRandomSeed(static_cast<int>(1e6*softTrkMet->phi())); top::check(m_met_systematics->applyCorrection(*softTrkMet), "Failed to applyCorrection"); diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MuonObjectCollectionMaker.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MuonObjectCollectionMaker.cxx index 896cdc2cce1556a0a5aa184e347f81f8b3609eb0..ea1e8ac0b29ec340d4b5a04ee0e331ee5afc66ab 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MuonObjectCollectionMaker.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/MuonObjectCollectionMaker.cxx @@ -136,7 +136,9 @@ namespace top { StatusCode MuonObjectCollectionMaker::execute(bool executeNominal) { + static const SG::AuxElement::ConstAccessor<float> topoetcone20("topoetcone20"); static const SG::AuxElement::ConstAccessor<float> ptvarcone30_TightTTVA_pt1000("ptvarcone30_TightTTVA_pt1000"); + static const SG::AuxElement::ConstAccessor<float> ptvarcone20_TightTTVA_pt500("ptvarcone20_TightTTVA_pt500"); static const SG::AuxElement::ConstAccessor<float> ptcone20_TightTTVA_pt1000("ptcone20_TightTTVA_pt1000"); static const SG::AuxElement::ConstAccessor<float> ptcone20_TightTTVA_pt500("ptcone20_TightTTVA_pt500"); static const SG::AuxElement::ConstAccessor<float> ptvarcone30_TightTTVA_pt500("ptvarcone30_TightTTVA_pt500"); @@ -243,31 +245,45 @@ namespace top { passIsol_Tight_VarRad = -1; passIsol_Loose_VarRad = -1; - passIsol_FCTight = m_isolationTool_FCTight->accept(*muon) ? 1 : 0; - passIsol_FCLoose = m_isolationTool_FCLoose->accept(*muon) ? 1 : 0; - passIsol_FCTightTrackOnly = m_isolationTool_FCTightTrackOnly->accept(*muon) ? 1 : 0; - passIsol_FCTightTrackOnly_FixedRad = m_isolationTool_FCTightTrackOnly_FixedRad->accept(*muon) ? 1 : 0; - passIsol_FCLoose_FixedRad = m_isolationTool_FCLoose_FixedRad->accept(*muon) ? 1 : 0; - passIsol_FCTight_FixedRad = m_isolationTool_FCTight_FixedRad->accept(*muon) ? 1 : 0; - passIsol_FixedCutPflowTight = m_isolationTool_FixedCutPflowTight->accept(*muon) ? 1 : 0; - passIsol_FixedCutPflowLoose = m_isolationTool_FixedCutPflowLoose->accept(*muon) ? 1 : 0; + if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon) + && topoetcone20.isAvailable(*muon)) { + passIsol_FCTight = m_isolationTool_FCTight->accept(*muon) ? 1 : 0; + passIsol_FCLoose = m_isolationTool_FCLoose->accept(*muon) ? 1 : 0; + passIsol_FCLoose_FixedRad = m_isolationTool_FCLoose_FixedRad->accept(*muon) ? 1 : 0; + passIsol_FCTight_FixedRad = m_isolationTool_FCTight_FixedRad->accept(*muon) ? 1 : 0; + } + + if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon)) { + passIsol_FCTightTrackOnly = m_isolationTool_FCTightTrackOnly->accept(*muon) ? 1 : 0; + passIsol_FCTightTrackOnly_FixedRad = m_isolationTool_FCTightTrackOnly_FixedRad->accept(*muon) ? 1 : 0; + } + + if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) + && ptvarcone20_TightTTVA_pt500.isAvailable(*muon) + && neflowisol20.isAvailable(*muon)) { + passIsol_FixedCutPflowTight = m_isolationTool_FixedCutPflowTight->accept(*muon) ? 1 : 0; + passIsol_FixedCutPflowLoose = m_isolationTool_FixedCutPflowLoose->accept(*muon) ? 1 : 0; + } //new Iso WPs - if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) && neflowisol20.isAvailable(*muon) && ptcone20_TightTTVA_pt500.isAvailable(*muon)) { + if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) + && neflowisol20.isAvailable(*muon) + && ptcone20_TightTTVA_pt500.isAvailable(*muon)) { passIsol_PflowTight_FixedRad = m_isolationTool_PflowTight_FixedRad->accept(*muon) ? 1 : 0; passIsol_PflowLoose_FixedRad = m_isolationTool_PflowLoose_FixedRad->accept(*muon) ? 1 : 0; } - if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) && neflowisol20.isAvailable(*muon)) { + if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) + && neflowisol20.isAvailable(*muon)) { passIsol_PflowTight_VarRad = m_isolationTool_PflowTight_VarRad->accept(*muon) ? 1 : 0; passIsol_PflowLoose_VarRad = m_isolationTool_PflowLoose_VarRad->accept(*muon) ? 1 : 0; } if (ptcone20_TightTTVA_pt1000.isAvailable(*muon)) { passIsol_HighPtTrackOnly = m_isolationTool_HighPtTrackOnly->accept(*muon) ? 1 : 0; } - if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon)) { + if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon)) { passIsol_TightTrackOnly_VarRad = m_isolationTool_TightTrackOnly_VarRad->accept(*muon) ? 1 : 0; } - if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon) && ptcone20_TightTTVA_pt500.isAvailable(*muon)) { + if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon) && ptcone20_TightTTVA_pt1000.isAvailable(*muon)) { passIsol_TightTrackOnly_FixedRad = m_isolationTool_TightTrackOnly_FixedRad->accept(*muon) ? 1 : 0; } if (ptvarcone30_TightTTVA_pt500.isAvailable(*muon)) { @@ -287,7 +303,7 @@ namespace top { passIsol_Tight_FixedRad = m_isolationTool_Tight_FixedRad->accept(*muon) ? 1 : 0; passIsol_Loose_FixedRad = m_isolationTool_Loose_FixedRad->accept(*muon) ? 1 : 0; } - if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon)) { + if (ptvarcone30_TightTTVA_pt1000.isAvailable(*muon) && topoetcone20.isAvailable(*muon)) { passIsol_Tight_VarRad = m_isolationTool_Tight_VarRad->accept(*muon) ? 1 : 0; passIsol_Loose_VarRad = m_isolationTool_Loose_VarRad->accept(*muon) ? 1 : 0; }