ATLAS Offline Software
TrigBtagEmulationJet.cxx
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 //**********************************************************************
9 
10 namespace Trig {
11 
13  const std::string& btagLink)
14  : m_jet(&jet),
15  m_btag(xAOD::BTaggingUtilities::getBTagging(jet, btagLink)),
16  m_pt(jet.pt()),
17  m_eta(jet.eta()),
18  m_phi(jet.phi()),
19  m_p4(jet.p4())
20 {}
21 
22 bool TrigBtagEmulationJet::satisfy(const std::string& tagger_name,
23  double workingPoint) const
24 {
25  if (not m_btag) return false;
26  if (tagger_name == "offperf") return true;
27 
28  double pu = -1;
29  double pb = -1;
30  double pc = -1;
31 
32  m_btag->pu(tagger_name, pu);
33  m_btag->pb(tagger_name, pb);
34  m_btag->pc(tagger_name, pc);
35 
36  double tagger_weight = dl1r_weight(pu, pb, pc);
37  return tagger_weight > workingPoint;
38 }
39 
40 }
41 
42 //**********************************************************************
43 
BTaggingUtilities.h
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
Trig::TrigBtagEmulationJet::m_btag
const xAOD::BTagging * m_btag
Definition: TrigBtagEmulationJet.h:40
Trig
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Trig::TrigBtagEmulationJet::TrigBtagEmulationJet
TrigBtagEmulationJet()=delete
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
Trig::TrigBtagEmulationJet::dl1r_weight
double dl1r_weight(double pu, double pb, double pc) const
Definition: TrigBtagEmulationJet.h:59
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
xAOD::BTagging_v1::pc
bool pc(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:367
Trig::TrigBtagEmulationJet::satisfy
bool satisfy(const std::string &tagger_name, double workingPoint) const
Definition: TrigBtagEmulationJet.cxx:22
xAOD::BTagging_v1::pu
bool pu(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:353
TrigBtagEmulationJet.h
xAOD::BTaggingUtilities::getBTagging
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Definition: BTaggingUtilities.cxx:37
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
xAOD::BTagging_v1::pb
bool pb(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:360