16 struct DescendingPt:std::function<bool(const xAOD::IParticle*, const xAOD::IParticle*)> {
18 return l->pt() >
r->pt();
22 template<
typename T,
typename...
Args>
24 return std::unique_ptr<T>(
new T(std::forward<Args>(
args)...));
29 const IInterface*
p) :
35 declareInterface<DerivationFramework::ISkimmingTool>(
this);
53 m_jetCalibrationTool.setTypeAndName(
"JetCalibrationTool/EXOT5JESTool");
54 CHECK(m_jetCalibrationTool.retrieve());
55 ATH_MSG_INFO(
"Retrieved tool: " << m_jetCalibrationTool);
57 return StatusCode::SUCCESS;
63 ATH_MSG_INFO(
"Processed " << m_ntot <<
" events, " << m_npass <<
" events passed filter ");
65 return StatusCode::SUCCESS;
80 bool passUncalibMonojetCut =
false;
81 bool passRecoJetCuts =
false;
82 bool passTruthJetCuts =
false;
84 std::unique_ptr<xAOD::JetContainer> recoJets = make_unique<xAOD::JetContainer>();
85 std::unique_ptr<xAOD::JetAuxContainer> recoJetsAux = make_unique<xAOD::JetAuxContainer>();
86 recoJets->setStore(recoJetsAux.get());
89 for (
const auto jet : *jets_shallowCopy.first) {
90 if (
jet->pt() > 100000.) passUncalibMonojetCut =
true;
92 if (m_jetCalibrationTool->applyCalibration(*jets_shallowCopy.first).isFailure()) {
96 for (
const auto jet : *jets_shallowCopy.first) {
101 delete jets_shallowCopy.first;
102 delete jets_shallowCopy.second;
106 if (recoJets->
size() > 1) {
107 TLorentzVector jet1 = recoJets->
at(0)->p4();
108 TLorentzVector jet2 = recoJets->
at(1)->p4();
109 auto dijet = jet1 + jet2;
112 if ((recoJets->
size() > 0 && recoJets->
at(0)->pt() > m_monoJetPt) || (recoJets->
size() > 1 && recoJets->
at(0)->pt() > m_leadingJetPt && recoJets->
at(1)->pt() > m_subleadingJetPt && mjj > m_Mjj)) passRecoJetCuts =
true;
118 std::unique_ptr<xAOD::JetContainer> truthJets = make_unique<xAOD::JetContainer>();
119 std::unique_ptr<xAOD::JetAuxContainer> truthJetsAux = make_unique<xAOD::JetAuxContainer>();
120 truthJets->setStore(truthJetsAux.get());
122 for (
const auto truthJet : *truthJetContainer) {
130 if (truthJets->
size() > 1) {
131 TLorentzVector truthJet1 = truthJets->
at(0)->p4();
132 TLorentzVector truthJet2 = truthJets->
at(1)->p4();
133 auto truthDijet = truthJet1 + truthJet2;
134 truthMjj = truthDijet.M();
136 if ((truthJets->
size() > 0 && truthJets->
at(0)->pt() > m_monoJetPt) || (truthJets->
size() > 1 && truthJets->
at(0)->pt() > m_leadingJetPt && truthJets->
at(1)->pt() > m_subleadingJetPt && truthMjj > m_Mjj)) passTruthJetCuts =
true;
139 bool acceptEvent = passUncalibMonojetCut || passRecoJetCuts || passTruthJetCuts;