ATLAS Offline Software
isocut.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "isocut.h"
6 
7 #include <stdexcept>
8 
9 namespace GlobalSim {
10  bool isocut(const std::string& threshold, const unsigned int bit) {
11  if (threshold == "None") {return true;}
12  if (threshold == "Loose") {return bit >= 1;}
13  if (threshold == "Medium") {return bit >= 2;}
14  if (threshold == "HadMedium") {return bit >= 2;}
15  if (threshold == "Tight") {return bit>= 3;}
16 
17  throw std::runtime_error("GlobalSim isocut() unnown threshold " +
18  threshold);
19  }
20 
21 
22  bool isocut(const unsigned int threshold, const unsigned int bit) {
23  if (bit >= threshold) {return true;}
24  return false;
25  }
26 
27 }
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h:8
threshold
Definition: chainparser.cxx:74
isocut.h
GlobalSim::isocut
bool isocut(const std::string &threshold, const unsigned int bit)
Definition: isocut.cxx:10