39 ATH_MSG_DEBUG(
"JetEfficiencyMonitorAlgorithm::fillHistograms");
40 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>
variables;
45 ATH_MSG_WARNING(
"Failed to retrieve Offline Small Radius Jet Container");
46 return StatusCode::SUCCESS;
52 return StatusCode::SUCCESS;
56 if(!gFexSRJetContainer.isValid()){
58 return StatusCode::SUCCESS;
62 if(!gFexLRJetContainer.isValid()){
64 return StatusCode::SUCCESS;
75 std::vector<std::string> gFex_types {
"leadingGfex_SmallRadiusTOB",
"leadingGfex_LargeRadiusTOB"};
79 std::vector<std::string> reference_trigger_options {
"Bootstrap",
"RandomHLT",
"No",
"Muon"};
81 bool bootstrap_ref_decision =
false;
82 bool random_ref_decision =
false;
83 bool muon_ref_decision =
false;
88 for (
auto &
u : muon_triggers) {
93 for (
auto &
u : HLTrandom_triggers) {
98 std::map<std::string, bool> reference_trigger_decision {
99 {
"Bootstrap", bootstrap_ref_decision },
100 {
"RandomHLT", random_ref_decision},
102 {
"Muon", muon_ref_decision}
108 constexpr
int minPt = 10*
GeV;
109 constexpr
float maxEta = 2.5;
111 std::map<std::string, SG::ReadHandle<xAOD::gFexJetRoIContainer>> gFEX_Container {
116 {
"leadingGfex_SmallRadiusTOB",gFexSRJetContainer}, {
"leadingGfex_LargeRadiusTOB", gFexLRJetContainer}
120 float offline_SR_pt = 0, offline_LR_pt = 0, gfex_SR_pt = 0, gfex_LR_pt=0;
121 std::map<std::string, float> jet_pt {
122 {
"leadingOffline_SmallRadiusJet", offline_SR_pt}, {
"leadingOffline_LargeRadiusJet", offline_LR_pt},
123 {
"leadingGfex_SmallRadiusTOB", gfex_SR_pt}, {
"leadingGfex_LargeRadiusTOB", gfex_LR_pt}
126 float offline_SR_eta = 0, offline_LR_eta = 0, gfex_SR_eta = 0, gfex_LR_eta=0;
127 std::map<std::string, float> jet_eta {
128 {
"leadingOffline_SmallRadiusJet", offline_SR_eta}, {
"leadingOffline_LargeRadiusJet", offline_LR_eta},
129 {
"leadingGfex_SmallRadiusTOB", gfex_SR_eta}, {
"leadingGfex_LargeRadiusTOB", gfex_LR_eta}
132 float offline_SR_phi = 0, offline_LR_phi = 0, gfex_SR_phi = 0, gfex_LR_phi=0;
133 std::map<std::string, float>
jet_phi {
134 {
"leadingOffline_SmallRadiusJet", offline_SR_phi}, {
"leadingOffline_LargeRadiusJet", offline_LR_phi},
135 {
"leadingGfex_SmallRadiusTOB", gfex_SR_phi}, {
"leadingGfex_LargeRadiusTOB", gfex_LR_phi}
143 if (!
jets->empty()) {
145 jet_pt[
"leadingOffline_SmallRadiusJet"] = (*leading_offline_SR_jet)->pt();
146 jet_eta[
"leadingOffline_SmallRadiusJet"] = (*leading_offline_SR_jet)->eta();
147 jet_phi[
"leadingOffline_SmallRadiusJet"] = (*leading_offline_SR_jet)->phi();
150 if (!LRjets->
empty()) {
152 jet_pt[
"leadingOffline_LargeRadiusJet"] = (*leading_offline_LR_jet)->pt();
153 jet_eta[
"leadingOffline_LargeRadiusJet"] = (*leading_offline_LR_jet)->eta();
154 jet_phi[
"leadingOffline_LargeRadiusJet"] = (*leading_offline_LR_jet)->phi();
160 float maximum_value_for_delta_r = 0.4;
161 for (
auto &
g : gFex_types){
162 if (!gFEX_Container[
g]->
empty()) {
164 float min_delta_r = 10000;
166 for (
const auto* gfex_jet : *gFEX_Container[
g]) {
167 std::string comparison_offline_jet =
"";
168 if (
g ==
"gfex_SmallRadiusTOB") {comparison_offline_jet =
"offline_SmallRadiusJet"; }
169 else if (
g ==
"gfex_LargeRadiusTOB") {comparison_offline_jet =
"offline_LargeRadiusJet"; }
170 float gfex_eta = gfex_jet->
eta();
171 float gfex_phi = gfex_jet->phi();
172 float delta_eta = std::abs(gfex_eta-jet_eta[comparison_offline_jet]),
175 if (maximum_value_for_delta_r > delta_r && delta_r < min_delta_r && std::abs(gfex_eta) <
maxEta){
176 min_delta_r = delta_r;
177 matching_gfex_jet = gfex_jet;
182 if (matching_gfex_jet !=
nullptr) {
183 jet_eta[
g] = matching_gfex_jet->
eta(),
jet_phi[
g] = matching_gfex_jet->
phi(), jet_pt[
g] = matching_gfex_jet->
et();
199 bool offlineSRJet_maxEta_minPt_requirement =
false;
200 if(std::abs(jet_eta[
"leadingOffline_SmallRadiusJet"])<=
maxEta && (jet_pt[
"leadingOffline_SmallRadiusJet"] >= minPt)) {
201 offlineSRJet_maxEta_minPt_requirement =
true;
205 bool offlineLRJet_maxEta_minPt_requirement =
false;
206 if(std::abs(jet_eta[
"leadingOffline_LargeRadiusJet"])<=
maxEta && (jet_pt[
"leadingOffline_LargeRadiusJet"] >= minPt)) {
207 offlineLRJet_maxEta_minPt_requirement =
true;
220 std::map<std::string, int> l1_trigger_flatline_vals {
224 {
"L1_gLJ80p0ETA25", 175*
GeV}, {
"L1_gLJ100p0ETA25", 200*
GeV},
225 {
"L1_gLJ140p0ETA25", 270*
GeV}, {
"L1_gLJ160p0ETA25", 270*
GeV}, {
"L1_SC111-CJ15", 270*
GeV}, {
"L1_gJ20p0ETA25", 40*
GeV},
226 {
"L1_gJ50p0ETA25", 80*
GeV}, {
"L1_gJ100p0ETA25", 200*
GeV},
227 {
"L1_gJ400p0ETA25", 800*
GeV}, {
"L1_jJ30", 50*
GeV}, {
"L1_jJ40", 60*
GeV},
228 {
"L1_jJ50", 70*
GeV}, {
"L1_jJ60", 80*
GeV}, {
"L1_jJ80", 100*
GeV},
229 {
"L1_jJ90", 110*
GeV}, {
"L1_jJ125", 135*
GeV}, {
"L1_jJ140", 160*
GeV}, {
"L1_jJ160", 180*
GeV},
230 {
"L1_jJ180", 200*
GeV}
237 if (offlineSRJet_maxEta_minPt_requirement ) {
247 for (
auto &
r : reference_trigger_options){
248 if (offlineSRJet_maxEta_minPt_requirement && reference_trigger_decision[
r]) {
252 for (
const auto& trigger_name : SmallRadiusJetTriggers_phase1){
253 bool trig_of_interest_decision =
false;
254 if (use_passed_before_prescale) {
258 trig_of_interest_decision = bits & TrigDefs::L1_isPassedBeforePrescale;
270 if (l1_trigger_flatline_vals.find(trigger_name) != l1_trigger_flatline_vals.end()) {
271 if(jet_pt[
"leadingOffline_SmallRadiusJet"]>l1_trigger_flatline_vals[trigger_name]) {
289 for (
auto &
r : reference_trigger_options){
290 if ( offlineLRJet_maxEta_minPt_requirement && reference_trigger_decision[
r]) {
293 for (
const auto& trigger_name : LargeRadiusJetTriggers_phase1){
294 bool trig_of_interest_decision =
false;
295 if (use_passed_before_prescale) {
297 trig_of_interest_decision = bits & TrigDefs::L1_isPassedBeforePrescale;
306 if (l1_trigger_flatline_vals.find(trigger_name) != l1_trigger_flatline_vals.end()) {
307 if(jet_pt[
"leadingOffline_LargelRadiusJet"]>l1_trigger_flatline_vals[trigger_name]) {
321 return StatusCode::SUCCESS;