ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CP::JetJvtEfficiency Class Reference

#include <JetJvtEfficiency.h>

Inheritance diagram for CP::JetJvtEfficiency:
Collaboration diagram for CP::JetJvtEfficiency:

Public Member Functions

 JetJvtEfficiency (const std::string &name)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
StatusCode histInitialize ()
 
virtual CorrectionCode getEfficiencyScaleFactor (const xAOD::Jet &jet, float &sf) override
 
virtual CorrectionCode getInefficiencyScaleFactor (const xAOD::Jet &jet, float &sf) override
 
virtual CorrectionCode applyEfficiencyScaleFactor (const xAOD::Jet &jet) override
 
virtual CorrectionCode applyInefficiencyScaleFactor (const xAOD::Jet &jet) override
 
virtual CorrectionCode applyAllEfficiencyScaleFactor (const xAOD::IParticleContainer *jets, float &sf) override
 
virtual bool passesJvtCut (const xAOD::Jet &jet) const override
 
virtual bool isInRange (const xAOD::Jet &jet) const override
 
virtual StatusCode decorate (const xAOD::JetContainer &jets) const override
 Decorate a jet collection without otherwise modifying it. More...
 
virtual StatusCode recalculateScores (const xAOD::JetContainer &jets) const override
 
bool isAffectedBySystematic (const CP::SystematicVariation &var) const override
 returns: whether this tool is affected by the given systematic guarantee: no-fail More...
 
CP::SystematicSet affectingSystematics () const override
 returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II More...
 
CP::SystematicSet recommendedSystematics () const override
 returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II More...
 
StatusCode applySystematicVariation (const CP::SystematicSet &set) override
 effects: configure this tool for the given list of systematic variations. More...
 
StatusCode sysApplySystematicVariation (const CP::SystematicSet &) override
 effects: configure this tool for the given list of systematic variations. More...
 
float getJvtThresh () const override
 
float getUserPtMax () const override
 
StatusCode tagTruth (const xAOD::IParticleContainer *jets, const xAOD::IParticleContainer *truthJets) override
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
const SystematicSetappliedSystematics () const
 returns: the list of systematics that have been applied to this tool. More...
 
std::string appliedSystematicsString () const
 returns: a string representation of appliedSystematics() guarantee: strong failures: out of memory II rationale: this is meant to be used when printing out the applied systematics for debugging purposes (or when embedding them in a string). More...
 
void testInvariant () const
 effects: test the invariance of this object guarantee: no-fail More...
 
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 
StatusCode addAffectingSystematic (const SystematicVariation &systematic, bool recommended)
 effects: add a systematic to the list of registered systematics. More...
 
StatusCode addRecommendedSystematic (const SystematicVariation &systematic)
 effects: add a systematic to the list of recommended systematics failures: unsupported systematic More...
 
void addAffectingSystematics (const SystematicSet &systematics)
 effects: add a SystematicSet to the registered systematics. More...
 
StatusCode addRecommendedSystematics (const SystematicSet &systematics)
 effects: add a SystematicSet to the recommended systematics. More...
 

Protected Attributes

SystematicSet m_affectingSystematics
 description: members directly corresponding to accessors More...
 
SystematicSet m_recommendedSystematics
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 JetJvtEfficiency ()
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SystApplied m_appliedSystEnum
 
ToolHandle< JetPileupTag::JetVertexNNTaggerm_NNJvtTool_handle
 
ToolHandle< IAsgSelectionToolm_jvtSelTool
 
ToolHandle< IJvtEfficiencyToolm_jvtEffTool
 
int m_tagger {}
 
std::string m_wp
 
std::string m_file
 
JvtTagger m_taggingAlg {}
 
std::unique_ptr< TH2 > m_h_JvtHist
 
std::unique_ptr< TH2 > m_h_EffHist
 
std::string m_passJvtDecName
 
std::string m_sf_decoration_name
 
std::string m_isHS_decoration_name
 
std::string m_truthJetContName
 
std::string m_jetEtaName
 
float m_maxPtForJvt {}
 
bool m_doTruthRequirement {}
 
std::string m_ORdec
 
bool m_useMuBinsSF {}
 
bool m_useDummySFs {}
 
std::string m_jetContainerName
 
std::string m_NNJvtParamFile
 
std::string m_NNJvtCutFile
 
std::string m_jetJvtMomentName
 
float m_jvtCut {}
 
float m_jvtCutBorder {}
 
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_jetEtaAcc
 
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_passORAcc
 
std::unique_ptr< SG::AuxElement::Decorator< float > > m_sfDec
 
std::unique_ptr< SG::AuxElement::Decorator< char > > m_isHSDec
 
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_isHSAcc
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_passJvtKey
 
bool m_suppressOutputDependence {}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 
SystematicSetm_appliedSystematics
 description: pointer to currenty applied systematics More...
 
std::unordered_map< SystematicSet, SystematicSetm_systFilterMap
 map of cached systematics filtering More...
 

Detailed Description

Definition at line 34 of file JetJvtEfficiency.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetJvtEfficiency() [1/2]

CP::JetJvtEfficiency::JetJvtEfficiency ( const std::string &  name)

Definition at line 23 of file JetJvtEfficiency.cxx.

23  : asg::AsgTool( name ),
25  m_NNJvtTool_handle("", this),
26  m_jvtSelTool("", this),
27  m_jvtEffTool("", this),
28  m_h_JvtHist(nullptr),
29  m_h_EffHist(nullptr),
30  m_passJvtDecName(""),
31  m_useMuBinsSF(false),
32  m_useDummySFs(false),
33  m_jvtCut(0),
34  m_jvtCutBorder(0),
35  m_jetEtaAcc(nullptr),
36  m_passORAcc(nullptr),
37  m_sfDec(nullptr),
38  m_isHSDec(nullptr),
39  m_isHSAcc(nullptr)
40  {
42  declareProperty( "NNJvtTool", m_NNJvtTool_handle, "NN Jvt tool" );
43  declareProperty( "WorkingPoint", m_wp = "Default" );
44  declareProperty( "SFFile", m_file = "" );
45  declareProperty( "JetContainerName", m_jetContainerName = "AntiKt4EMPFlowJets" );
46  declareProperty( "ScaleFactorDecorationName", m_sf_decoration_name = "" );
47  declareProperty( "OverlapDecorator", m_ORdec = "" );
48  declareProperty( "JetEtaName", m_jetEtaName = "DetectorEta" );
49  declareProperty( "MaxPtForJvt", m_maxPtForJvt = 60e3 );
50  declareProperty( "DoTruthReq", m_doTruthRequirement = true );
51  declareProperty( "TruthLabel", m_isHS_decoration_name = "isJvtHS" );
52  declareProperty( "TruthJetContainerName", m_truthJetContName = "AntiKt4TruthDressedWZJets" );
53  // Allow to configure NNJvt Tool directly instead via WP property
54  declareProperty( "NNJvtParamFile", m_NNJvtParamFile= "" );
55  declareProperty( "NNJvtCutFile", m_NNJvtCutFile= "" );
56  declareProperty( "SuppressOutputDependence", m_suppressOutputDependence = true );
57  // Legacy properties, kept for backwards compatibility
58  declareProperty( "JetJvtMomentName", m_jetJvtMomentName = "Jvt" );
59 
60 }

◆ JetJvtEfficiency() [2/2]

CP::JetJvtEfficiency::JetJvtEfficiency ( )
private

Member Function Documentation

◆ addAffectingSystematic()

StatusCode CP::SystematicsTool::addAffectingSystematic ( const SystematicVariation systematic,
bool  recommended 
)
protectedinherited

effects: add a systematic to the list of registered systematics.

It will optionally also add this sytematic to the recommended set. side effects: this will add the systematic to the global list of systematics, if not already there guarantee: strong failures: out of memory II

Definition at line 111 of file SystematicsTool.cxx.

112  {
113 
114  RCU_READ_INVARIANT( this );
115 
116  SystematicRegistry& reg = SystematicRegistry::getInstance();
117  reg.registerSystematic( systematic );
118  m_affectingSystematics.insert( systematic );
119  if( recommended ) {
120  if( addRecommendedSystematic(systematic) != StatusCode::SUCCESS ) {
121  return StatusCode::FAILURE;
122  }
123  }
124  return StatusCode::SUCCESS;
125  }

◆ addAffectingSystematics()

void CP::SystematicsTool::addAffectingSystematics ( const SystematicSet systematics)
protectedinherited

effects: add a SystematicSet to the registered systematics.

Definition at line 141 of file SystematicsTool.cxx.

142  {
143 
144  RCU_READ_INVARIANT( this );
145 
146  SystematicRegistry& reg = SystematicRegistry::getInstance();
148  reg.registerSystematics( systematics );
149  }

◆ addRecommendedSystematic()

StatusCode CP::SystematicsTool::addRecommendedSystematic ( const SystematicVariation systematic)
protectedinherited

effects: add a systematic to the list of recommended systematics failures: unsupported systematic

Definition at line 127 of file SystematicsTool.cxx.

128  {
129 
130  RCU_READ_INVARIANT( this );
131 
132  SystematicRegistry& reg = SystematicRegistry::getInstance();
133  m_recommendedSystematics.insert( systematic );
134  if( reg.addSystematicToRecommended( systematic ) !=
135  StatusCode::SUCCESS ) {
136  return StatusCode::FAILURE;
137  }
138  return StatusCode::SUCCESS;
139  }

◆ addRecommendedSystematics()

StatusCode CP::SystematicsTool::addRecommendedSystematics ( const SystematicSet systematics)
protectedinherited

effects: add a SystematicSet to the recommended systematics.

Definition at line 151 of file SystematicsTool.cxx.

152  {
153 
154  RCU_READ_INVARIANT( this );
155 
156  SystematicRegistry& reg = SystematicRegistry::getInstance();
158  if( reg.addSystematicsToRecommended( systematics ) !=
159  StatusCode::SUCCESS ) {
160  return StatusCode::FAILURE;
161  }
162  return StatusCode::SUCCESS;
163  }

◆ affectingSystematics()

CP::SystematicSet CP::JetJvtEfficiency::affectingSystematics ( ) const
inlineoverridevirtual

returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II

Reimplemented from CP::SystematicsTool.

Definition at line 61 of file JetJvtEfficiency.h.

◆ appliedSystematics()

const SystematicSet & CP::SystematicsTool::appliedSystematics ( ) const
inherited

returns: the list of systematics that have been applied to this tool.

this is not including systematics that were applied, but do not affect this tool guarantee: no-fail

Definition at line 54 of file SystematicsTool.cxx.

54  {
55 
56  RCU_READ_INVARIANT( this );
57  if(m_appliedSystematics == 0){
58  std::cerr << "SystematicsTool::appliedSystematics WARNING: "
59  << "no systematic configuration has been applied yet. "
60  << "Returning NULL" << std::endl;
61  static const SystematicSet dummy;
62  return dummy;
63  }
64  return *m_appliedSystematics;
65  }

◆ appliedSystematicsString()

std::string CP::SystematicsTool::appliedSystematicsString ( ) const
inherited

returns: a string representation of appliedSystematics() guarantee: strong failures: out of memory II rationale: this is meant to be used when printing out the applied systematics for debugging purposes (or when embedding them in a string).

Definition at line 67 of file SystematicsTool.cxx.

67  {
68 
69  RCU_READ_INVARIANT( this );
70  return m_appliedSystematics->name();
71  }

◆ applyAllEfficiencyScaleFactor()

CorrectionCode CP::JetJvtEfficiency::applyAllEfficiencyScaleFactor ( const xAOD::IParticleContainer jets,
float &  sf 
)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 239 of file JetJvtEfficiency.cxx.

239  {
240  sf = 1;
241  const xAOD::JetContainer *truthJets = nullptr;
242  if( evtStore()->retrieve(truthJets, m_truthJetContName).isFailure()) {
243  ATH_MSG_ERROR("Unable to retrieve truth jet container with name " << m_truthJetContName);
245 
246  }
247  if(!truthJets || tagTruth(jets,truthJets).isFailure()) {
248  ATH_MSG_ERROR("Unable to match truthJets to jets in tagTruth() method");
250  }
251  for(const auto *const ipart : *jets) {
252  if (ipart->type()!=xAOD::Type::Jet) {
253  ATH_MSG_ERROR("Input is not a jet");
255  }
256  const xAOD::Jet *jet = static_cast<const xAOD::Jet*>(ipart);
257  float current_sf = 0;
258 
259  CorrectionCode result;
260  if (passesJvtCut(*jet)) {
261  result = this->getEfficiencyScaleFactor(*jet,current_sf);
262  }
263  else {
264  result = this->getInefficiencyScaleFactor(*jet,current_sf);
265  }
266 
267  // set the SF to 1 in case the corrections don't apply for this jet
269  current_sf = 1.0;
270  }
271  else if (result == CP::CorrectionCode::Error) {
272  ATH_MSG_ERROR("Inexplicably failed JVT calibration" );
273  return result;
274  }
275  (*m_sfDec)(*jet) = current_sf;
276  sf *= current_sf;
277  }
278  return CorrectionCode::Ok;
279 }

◆ applyEfficiencyScaleFactor()

CorrectionCode CP::JetJvtEfficiency::applyEfficiencyScaleFactor ( const xAOD::Jet jet)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 225 of file JetJvtEfficiency.cxx.

225  {
226  float sf = 0;
227  CorrectionCode result = this->getEfficiencyScaleFactor(jet,sf);
228  (*m_sfDec)(jet) = sf;
229  return result;
230 }

◆ applyInefficiencyScaleFactor()

CorrectionCode CP::JetJvtEfficiency::applyInefficiencyScaleFactor ( const xAOD::Jet jet)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 232 of file JetJvtEfficiency.cxx.

232  {
233  float sf = 0;
234  CorrectionCode result = this->getInefficiencyScaleFactor(jet,sf);
235  (*m_sfDec)(jet) = sf;
236  return result;
237 }

◆ applySystematicVariation()

StatusCode CP::JetJvtEfficiency::applySystematicVariation ( const CP::SystematicSet systConfig)
inlineoverridevirtual

effects: configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). guarantee: basic failures: out of memory II failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors

Reimplemented from CP::SystematicsTool.

Definition at line 63 of file JetJvtEfficiency.h.

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decorate()

StatusCode CP::JetJvtEfficiency::decorate ( const xAOD::JetContainer jets) const
overridevirtual

Decorate a jet collection without otherwise modifying it.

Implements IJetDecorator.

Definition at line 281 of file JetJvtEfficiency.cxx.

281  {
283  for(const xAOD::Jet* jet : jets)
284  passJvtHandle(*jet) = passesJvtCut(*jet);
285  return StatusCode::SUCCESS;
286 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getEfficiencyScaleFactor()

CorrectionCode CP::JetJvtEfficiency::getEfficiencyScaleFactor ( const xAOD::Jet jet,
float &  sf 
)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 217 of file JetJvtEfficiency.cxx.

217  {
218  return m_jvtEffTool->getEfficiencyScaleFactor(jet, sf);
219 }

◆ getInefficiencyScaleFactor()

CorrectionCode CP::JetJvtEfficiency::getInefficiencyScaleFactor ( const xAOD::Jet jet,
float &  sf 
)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 221 of file JetJvtEfficiency.cxx.

221  {
222  return m_jvtEffTool->getInefficiencyScaleFactor(jet, sf);
223 }

◆ getJvtThresh()

float CP::JetJvtEfficiency::getJvtThresh ( ) const
inlineoverridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 66 of file JetJvtEfficiency.h.

66 {return m_jvtCut;}

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getUserPtMax()

float CP::JetJvtEfficiency::getUserPtMax ( ) const
inlineoverridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 67 of file JetJvtEfficiency.h.

67 {return m_maxPtForJvt;}

◆ histInitialize()

StatusCode CP::JetJvtEfficiency::histInitialize ( )

◆ initialize()

StatusCode CP::JetJvtEfficiency::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 62 of file JetJvtEfficiency.cxx.

62  {
63 
64  // Check if specified tagger is defined (Athena/Gaudi doesn't allow enums as properties so we make the conversion manually)
65  m_taggingAlg = static_cast<CP::JvtTagger>(m_tagger);
67  ATH_MSG_ERROR("Invalid Jvt tagger selected: " << m_tagger << "! Choose between CP::JvtTagger::NNJvt, CP::JvtTagger::fJvt and CP::JvtTagger::Jvt (deprecated).");
68  return StatusCode::FAILURE;
69  }
70 
71  // NN Jvt has been developed and tested only on EMPflow jets so far and R22 calibrations are only provided for that jet collection
72  if (m_jetContainerName != "AntiKt4EMPFlowJets") {
73  ATH_MSG_WARNING("Only AntiKt4EMPFlowJets are supported, use other jet collections at your own risk.");
74  }
75 
76  ATH_CHECK(m_passJvtKey.initialize());
77  #ifndef XAOD_STANDALONE
80  }
81  #endif
82 
83  asg::AsgToolConfig selToolCfg;
84  ATH_CHECK(selToolCfg.setProperty("MaxPtForJvt", m_maxPtForJvt));
85  if (m_wp != "Default")
86  ATH_CHECK(selToolCfg.setProperty("WorkingPoint", m_wp));
87  ATH_CHECK(selToolCfg.setProperty("OutputLevel", msg().level()));
88 
89  asg::AsgToolConfig effToolCfg;
90  ATH_CHECK(effToolCfg.setProperty("MaxPtForJvt", m_maxPtForJvt));
91  if (m_wp != "Default")
92  ATH_CHECK(effToolCfg.setProperty("WorkingPoint", m_wp));
93  // Setting DummySFs.root should be replaced by an empty string now
94  if (!m_file.empty() && m_file != "DummySFs.root") {
95  // This is annoying but the tool used to allow you to set a nonsensical SF file and it would
96  // just ignore it
97  if (m_taggingAlg == JvtTagger::NNJvt && m_file.find("NNJvtSFFile") == std::string::npos)
98  ATH_MSG_WARNING("Supplied SF file " << m_file << " doesn't seem to contain SFs for NNJvt, falling back to dummy SFs ...");
99  else
100  ATH_CHECK(effToolCfg.setProperty("SFFile", m_file));
101  }
102  ATH_CHECK(effToolCfg.setProperty("DoTruthReq", m_doTruthRequirement));
103  ATH_CHECK(effToolCfg.setProperty("TruthHSLabel", m_isHS_decoration_name));
104  ATH_CHECK(effToolCfg.setProperty("OutputLevel", msg().level()));
105 
106  // Configure for NNJvt mode
108 
109  ATH_MSG_INFO("Configuring JetJvtEfficiency tool for NNJvt algorithm.");
110  selToolCfg.setTypeAndName("CP::NNJvtSelectionTool/JvtSelTool");
111  ATH_CHECK(selToolCfg.setProperty("JvtMomentName", "NNJvt"));
112  effToolCfg.setTypeAndName("CP::NNJvtEfficiencyTool/JvtEffTool");
113 
114 
115  // select cut file according to WP
116  if (m_wp == "Default") { m_wp = "FixedEffPt"; }
117  if (m_NNJvtCutFile.empty()) {
118  if (m_wp == "FixedEffPt") {
119  m_NNJvtCutFile = "NNJVT.Cuts.FixedEffPt.Offline.Nonprompt_All_MaxW.json";
120  }
121  else if (m_wp == "TightFwd") {
122  m_NNJvtCutFile = "NNJVT.Cuts.TightFwd.Offline.Nonprompt_All_MaxWeight.json";
123  }
124  else {
125  ATH_MSG_ERROR("Unkown NNJvt WP " << m_wp << ", choose between FixedEffPt (Default) and TightFwd.");
126  return StatusCode::FAILURE;
127  }
128  }
129 
130  // set a default SF decoration name if not explicitly specified
131  if (m_sf_decoration_name.empty()){
132  m_sf_decoration_name = "NNJvtSF";
133  }
134 
135  if (m_NNJvtParamFile.empty()) {
136  m_NNJvtParamFile = "NNJVT.Network.graph.Offline.Nonprompt_All_MaxWeight.json";
137  }
138 
139  // setup the NNJvt tool for recalculating NNJvt scores
140  if (m_NNJvtTool_handle.empty()) {
141  ATH_MSG_INFO( "NNJvtTool is empty! Initializing default tool ");
142  asg::AsgToolConfig config_NNjvt ("JetPileupTag::JetVertexNNTagger/NNJvt");
143  ATH_CHECK(config_NNjvt.setProperty("JetContainer", m_jetContainerName+"_NNJvtCopy"));
144  ATH_CHECK(config_NNjvt.setProperty("NNParamFile", m_NNJvtParamFile));
145  ATH_CHECK(config_NNjvt.setProperty("NNCutFile", m_NNJvtCutFile));
146  ATH_CHECK(config_NNjvt.setProperty("SuppressInputDependence", true)); // otherwise decorations can't be accessed properly
147  ATH_CHECK(config_NNjvt.setProperty("SuppressOutputDependence", m_suppressOutputDependence));
148  ATH_CHECK(config_NNjvt.makePrivateTool(m_NNJvtTool_handle));
149  }
150 
151  ATH_CHECK(m_NNJvtTool_handle.retrieve());
152 
153  // NNJvt tool will decorate decision on jets that we can retrieve
154  m_passJvtDecName = "NNJvtPass";
155  }
156  // configure for fJvt mode
157  else if (m_taggingAlg == JvtTagger::fJvt){
158 
159  ATH_MSG_INFO("Configuring JetJvtEfficiency tool for fJvt algorithm.");
160  selToolCfg.setTypeAndName("CP::FJvtSelectionTool/JvtSelTool");
161  ATH_CHECK(selToolCfg.setProperty("JvtMomentName", "DFCommonJets_fJvt"));
162  effToolCfg.setTypeAndName("CP::FJvtEfficiencyTool/JvtEffTool");
163  // set a default SF decoration name if not explicitly specified
164  if (m_sf_decoration_name.empty()){
165  m_sf_decoration_name = "fJvtSF";
166  }
167 
168  // fJvt uses mu vs pT binning
169  m_useMuBinsSF = true;
170  }
171  // configure for Jvt mode (deprecated)
172  else {
173 
174  bool ispflow = (m_jetContainerName.find("EMPFlow") != std::string::npos);
175  ATH_MSG_INFO("Configuring JetJvtEfficiency tool for Jvt algorithm.");
176  ATH_MSG_WARNING("Jvt is deprecated in R22 and no calibrations will be provided, please move to NNJvt.");
177  selToolCfg.setTypeAndName("CP::JvtSelectionTool/JvtSelTool");
178  ATH_CHECK(selToolCfg.setProperty("IsPFlow", ispflow));
179  ATH_CHECK(selToolCfg.setProperty("JvtMomentName", m_jetJvtMomentName));
180  ATH_CHECK(selToolCfg.setProperty("JetContainer", m_jetContainerName));
181  effToolCfg.setTypeAndName("CP::JvtEfficiencyTool/JvtEffTool");
182  ATH_CHECK(effToolCfg.setProperty("JetContainer", m_jetContainerName));
183  ATH_CHECK(effToolCfg.setProperty("IsPFlow", ispflow));
184  // set a default SF decoration name if not explicitly specified
185  if (m_sf_decoration_name.empty()){
186  m_sf_decoration_name = "JvtSF";
187  }
188  }
189 
192  addAffectingSystematics(m_jvtEffTool->affectingSystematics());
193  ATH_CHECK(addRecommendedSystematics(m_jvtEffTool->recommendedSystematics()));
194 
195  if (m_file.find("DummySF") != std::string::npos) {
196  m_useDummySFs = true;
197  ATH_MSG_INFO("Using dummy SFs of 1 +/ 10% for NNJvt.");
198  }
199 
200  // Configure for nominal systematics
201  if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) {
202  ATH_MSG_ERROR("Could not configure for nominal settings");
203  return StatusCode::FAILURE;
204  }
205 
206  m_jetEtaAcc = std::make_unique<SG::AuxElement::ConstAccessor<float>>(m_jetEtaName);
207  m_sfDec = std::make_unique<SG::AuxElement::Decorator< float>>(m_sf_decoration_name);
208  m_isHSDec = std::make_unique<SG::AuxElement::Decorator<char>>(m_isHS_decoration_name);
209  m_isHSAcc = std::make_unique<SG::AuxElement::ConstAccessor<char>>(m_isHS_decoration_name);
210  if (!m_ORdec.empty()) {
211  m_passORAcc = std::make_unique<SG::AuxElement::ConstAccessor<char>>(m_ORdec);
212  }
213 
214  return StatusCode::SUCCESS;
215 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isAffectedBySystematic()

bool CP::JetJvtEfficiency::isAffectedBySystematic ( const CP::SystematicVariation systematic) const
inlineoverridevirtual

returns: whether this tool is affected by the given systematic guarantee: no-fail

Reimplemented from CP::SystematicsTool.

Definition at line 60 of file JetJvtEfficiency.h.

◆ isInRange()

bool CP::JetJvtEfficiency::isInRange ( const xAOD::Jet jet) const
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 305 of file JetJvtEfficiency.cxx.

305  {
306  // if defined, require jet to pass OR flag
307  if (m_passORAcc && !(*m_passORAcc)(jet)) return false;
308  if ( m_useMuBinsSF ){
309  if (std::abs((*m_jetEtaAcc)(jet))<2.5) return false;
310  if (std::abs((*m_jetEtaAcc)(jet))>4.5) return false;
311  } else {
312  // in case a SF file has been specified look up if eta of jet is covered by the file
313  if (!m_useDummySFs) {
314  if (std::abs((*m_jetEtaAcc)(jet))<m_h_JvtHist->GetYaxis()->GetBinLowEdge(1)) return false;
315  if (std::abs((*m_jetEtaAcc)(jet))>m_h_JvtHist->GetYaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsY())) return false;
316  }
317  // in case dummy SFs are used (NNJvt only), manually restrict pile-up jets to central region
318  else {
319  if (std::abs((*m_jetEtaAcc)(jet))>2.5) return false;
320  }
321  }
322  // skip check of histograms when using dummy SFs as no histograms have been loaded
323  if (!m_useDummySFs){
324  if (jet.pt()<m_h_JvtHist->GetXaxis()->GetBinLowEdge(1)) return false;
325  if (jet.pt()>m_h_JvtHist->GetXaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsX())) return false;
326  }
327  else {
328  if (jet.pt() < 20e3) return false;
329  }
330  if (jet.pt()>m_maxPtForJvt) return false;
331  return true;
332 }

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32 {return decorate(jets);};

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ passesJvtCut()

bool CP::JetJvtEfficiency::passesJvtCut ( const xAOD::Jet jet) const
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 300 of file JetJvtEfficiency.cxx.

300  {
301  ATH_MSG_DEBUG("In JetJvtEfficiency::passesJvtCut ()");
302  return bool(m_jvtSelTool->accept(&jet));
303 }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ recalculateScores()

StatusCode CP::JetJvtEfficiency::recalculateScores ( const xAOD::JetContainer jets) const
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 288 of file JetJvtEfficiency.cxx.

288  {
289  // recalculate NNJvt scores and passNNJvt decorations
291  ATH_CHECK(m_NNJvtTool_handle->decorate(jets));
292  return StatusCode::SUCCESS;
293  }
294  // not required for other taggers, so return gently
295  else {
296  return StatusCode::SUCCESS;
297  }
298 }

◆ recommendedSystematics()

CP::SystematicSet CP::JetJvtEfficiency::recommendedSystematics ( ) const
inlineoverridevirtual

returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II

Reimplemented from CP::SystematicsTool.

Definition at line 62 of file JetJvtEfficiency.h.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysApplySystematicVariation()

StatusCode CP::JetJvtEfficiency::sysApplySystematicVariation ( const CP::SystematicSet systConfig)
overridevirtual

effects: configure this tool for the given list of systematic variations.

systConfig is guaranteed to contain only supported systematics. guarantee: basic failures: out of memory II failures: unsupported combination of supported systematics failures: other tool specific errors

Implements CP::SystematicsTool.

Definition at line 334 of file JetJvtEfficiency.cxx.

334  {
335  return m_jvtEffTool->applySystematicVariation(systSet);
336 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tagTruth()

StatusCode CP::JetJvtEfficiency::tagTruth ( const xAOD::IParticleContainer jets,
const xAOD::IParticleContainer truthJets 
)
overridevirtual

Implements CP::IJetJvtEfficiency.

Definition at line 338 of file JetJvtEfficiency.cxx.

338  {
339  for(const auto *const jet : *jets) {
340  bool ishs = false;
341  bool ispu = true;
342  for(const auto *const tjet : *truthJets) {
343  if (tjet->p4().DeltaR(jet->p4())<0.3 && tjet->pt()>10e3) ishs = true;
344  if (tjet->p4().DeltaR(jet->p4())<0.6) ispu = false;
345  }
346  (*m_isHSDec)(*jet)=ishs;
347  isPUDec(*jet)=ispu;
348  }
349  return StatusCode::SUCCESS;
350  }

◆ testInvariant()

void CP::SystematicsTool::testInvariant ( ) const
inherited

effects: test the invariance of this object guarantee: no-fail

Definition at line 165 of file SystematicsTool.cxx.

165  {
166 
167  //RCU_INVARIANT( this != 0 );
168  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_affectingSystematics

SystematicSet CP::SystematicsTool::m_affectingSystematics
protectedinherited

description: members directly corresponding to accessors

Definition at line 146 of file SystematicsTool.h.

◆ m_appliedSystematics

SystematicSet* CP::SystematicsTool::m_appliedSystematics
privateinherited

description: pointer to currenty applied systematics

Definition at line 151 of file SystematicsTool.h.

◆ m_appliedSystEnum

SystApplied CP::JetJvtEfficiency::m_appliedSystEnum
private

Definition at line 74 of file JetJvtEfficiency.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doTruthRequirement

bool CP::JetJvtEfficiency::m_doTruthRequirement {}
private

Definition at line 92 of file JetJvtEfficiency.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_file

std::string CP::JetJvtEfficiency::m_file
private

Definition at line 82 of file JetJvtEfficiency.h.

◆ m_h_EffHist

std::unique_ptr<TH2> CP::JetJvtEfficiency::m_h_EffHist
private

Definition at line 85 of file JetJvtEfficiency.h.

◆ m_h_JvtHist

std::unique_ptr<TH2> CP::JetJvtEfficiency::m_h_JvtHist
private

Definition at line 84 of file JetJvtEfficiency.h.

◆ m_isHS_decoration_name

std::string CP::JetJvtEfficiency::m_isHS_decoration_name
private

Definition at line 88 of file JetJvtEfficiency.h.

◆ m_isHSAcc

std::unique_ptr<SG::AuxElement::ConstAccessor< char > > CP::JetJvtEfficiency::m_isHSAcc
private

Definition at line 110 of file JetJvtEfficiency.h.

◆ m_isHSDec

std::unique_ptr<SG::AuxElement::Decorator< char > > CP::JetJvtEfficiency::m_isHSDec
private

Definition at line 109 of file JetJvtEfficiency.h.

◆ m_jetContainerName

std::string CP::JetJvtEfficiency::m_jetContainerName
private

Definition at line 96 of file JetJvtEfficiency.h.

◆ m_jetEtaAcc

std::unique_ptr<SG::AuxElement::ConstAccessor< float > > CP::JetJvtEfficiency::m_jetEtaAcc
private

Definition at line 106 of file JetJvtEfficiency.h.

◆ m_jetEtaName

std::string CP::JetJvtEfficiency::m_jetEtaName
private

Definition at line 90 of file JetJvtEfficiency.h.

◆ m_jetJvtMomentName

std::string CP::JetJvtEfficiency::m_jetJvtMomentName
private

Definition at line 101 of file JetJvtEfficiency.h.

◆ m_jvtCut

float CP::JetJvtEfficiency::m_jvtCut {}
private

Definition at line 102 of file JetJvtEfficiency.h.

◆ m_jvtCutBorder

float CP::JetJvtEfficiency::m_jvtCutBorder {}
private

Definition at line 103 of file JetJvtEfficiency.h.

◆ m_jvtEffTool

ToolHandle<IJvtEfficiencyTool> CP::JetJvtEfficiency::m_jvtEffTool
private

Definition at line 78 of file JetJvtEfficiency.h.

◆ m_jvtSelTool

ToolHandle<IAsgSelectionTool> CP::JetJvtEfficiency::m_jvtSelTool
private

Definition at line 77 of file JetJvtEfficiency.h.

◆ m_maxPtForJvt

float CP::JetJvtEfficiency::m_maxPtForJvt {}
private

Definition at line 91 of file JetJvtEfficiency.h.

◆ m_NNJvtCutFile

std::string CP::JetJvtEfficiency::m_NNJvtCutFile
private

Definition at line 98 of file JetJvtEfficiency.h.

◆ m_NNJvtParamFile

std::string CP::JetJvtEfficiency::m_NNJvtParamFile
private

Definition at line 97 of file JetJvtEfficiency.h.

◆ m_NNJvtTool_handle

ToolHandle<JetPileupTag::JetVertexNNTagger> CP::JetJvtEfficiency::m_NNJvtTool_handle
private

Definition at line 76 of file JetJvtEfficiency.h.

◆ m_ORdec

std::string CP::JetJvtEfficiency::m_ORdec
private

Definition at line 93 of file JetJvtEfficiency.h.

◆ m_passJvtDecName

std::string CP::JetJvtEfficiency::m_passJvtDecName
private

Definition at line 86 of file JetJvtEfficiency.h.

◆ m_passJvtKey

SG::WriteDecorHandleKey<xAOD::JetContainer> CP::JetJvtEfficiency::m_passJvtKey
private
Initial value:
{this, "PassJVTKey", "passJvt",
"SG key for passJvt decoration (including jet container name)"}

Definition at line 112 of file JetJvtEfficiency.h.

◆ m_passORAcc

std::unique_ptr<SG::AuxElement::ConstAccessor< char > > CP::JetJvtEfficiency::m_passORAcc
private

Definition at line 107 of file JetJvtEfficiency.h.

◆ m_recommendedSystematics

SystematicSet CP::SystematicsTool::m_recommendedSystematics
protectedinherited

Definition at line 147 of file SystematicsTool.h.

◆ m_sf_decoration_name

std::string CP::JetJvtEfficiency::m_sf_decoration_name
private

Definition at line 87 of file JetJvtEfficiency.h.

◆ m_sfDec

std::unique_ptr<SG::AuxElement::Decorator< float > > CP::JetJvtEfficiency::m_sfDec
private

Definition at line 108 of file JetJvtEfficiency.h.

◆ m_suppressOutputDependence

bool CP::JetJvtEfficiency::m_suppressOutputDependence {}
private

Definition at line 114 of file JetJvtEfficiency.h.

◆ m_systFilterMap

std::unordered_map<SystematicSet, SystematicSet> CP::SystematicsTool::m_systFilterMap
privateinherited

map of cached systematics filtering

Definition at line 154 of file SystematicsTool.h.

◆ m_tagger

int CP::JetJvtEfficiency::m_tagger {}
private

Definition at line 80 of file JetJvtEfficiency.h.

◆ m_taggingAlg

JvtTagger CP::JetJvtEfficiency::m_taggingAlg {}
private

Definition at line 83 of file JetJvtEfficiency.h.

◆ m_truthJetContName

std::string CP::JetJvtEfficiency::m_truthJetContName
private

Definition at line 89 of file JetJvtEfficiency.h.

◆ m_useDummySFs

bool CP::JetJvtEfficiency::m_useDummySFs {}
private

Definition at line 95 of file JetJvtEfficiency.h.

◆ m_useMuBinsSF

bool CP::JetJvtEfficiency::m_useMuBinsSF {}
private

Definition at line 94 of file JetJvtEfficiency.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wp

std::string CP::JetJvtEfficiency::m_wp
private

Definition at line 81 of file JetJvtEfficiency.h.


The documentation for this class was generated from the following files:
CP::Jvt
@ Jvt
Definition: IJetJvtEfficiency.h:23
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CP::JetJvtEfficiency::m_jvtCutBorder
float m_jvtCutBorder
Definition: JetJvtEfficiency.h:103
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
CP::JetJvtEfficiency::m_doTruthRequirement
bool m_doTruthRequirement
Definition: JetJvtEfficiency.h:92
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
CP::JetJvtEfficiency::m_sfDec
std::unique_ptr< SG::AuxElement::Decorator< float > > m_sfDec
Definition: JetJvtEfficiency.h:108
get_generator_info.result
result
Definition: get_generator_info.py:21
CP::JetJvtEfficiency::m_passJvtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_passJvtKey
Definition: JetJvtEfficiency.h:112
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
CP::JetJvtEfficiency::m_tagger
int m_tagger
Definition: JetJvtEfficiency.h:80
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::SystematicsTool::m_appliedSystematics
SystematicSet * m_appliedSystematics
description: pointer to currenty applied systematics
Definition: SystematicsTool.h:151
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::JetJvtEfficiency::m_passJvtDecName
std::string m_passJvtDecName
Definition: JetJvtEfficiency.h:86
CP::JetJvtEfficiency::applySystematicVariation
StatusCode applySystematicVariation(const CP::SystematicSet &set) override
effects: configure this tool for the given list of systematic variations.
Definition: JetJvtEfficiency.h:63
CP::JetJvtEfficiency::m_jvtEffTool
ToolHandle< IJvtEfficiencyTool > m_jvtEffTool
Definition: JetJvtEfficiency.h:78
AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
CP::JetJvtEfficiency::m_appliedSystEnum
SystApplied m_appliedSystEnum
Definition: JetJvtEfficiency.h:74
CP::JetJvtEfficiency::m_file
std::string m_file
Definition: JetJvtEfficiency.h:82
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::JetJvtEfficiency::m_NNJvtTool_handle
ToolHandle< JetPileupTag::JetVertexNNTagger > m_NNJvtTool_handle
Definition: JetJvtEfficiency.h:76
CP::SystematicsTool::affectingSystematics
virtual SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of ...
Definition: SystematicsTool.cxx:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CP::SystematicsTool::addAffectingSystematics
void addAffectingSystematics(const SystematicSet &systematics)
effects: add a SystematicSet to the registered systematics.
Definition: SystematicsTool.cxx:142
CP::SystematicSet::name
std::string name() const
returns: the systematics joined into a single string.
Definition: SystematicSet.cxx:278
CP::JetJvtEfficiency::m_wp
std::string m_wp
Definition: JetJvtEfficiency.h:81
CP::SystematicsTool::m_affectingSystematics
SystematicSet m_affectingSystematics
description: members directly corresponding to accessors
Definition: SystematicsTool.h:146
CP::SystematicsTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
Definition: SystematicsTool.cxx:74
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CP::JetJvtEfficiency::getEfficiencyScaleFactor
virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet &jet, float &sf) override
Definition: JetJvtEfficiency.cxx:217
CP::JetJvtEfficiency::m_taggingAlg
JvtTagger m_taggingAlg
Definition: JetJvtEfficiency.h:83
CP::JetJvtEfficiency::m_useDummySFs
bool m_useDummySFs
Definition: JetJvtEfficiency.h:95
CP::JetJvtEfficiency::m_jvtSelTool
ToolHandle< IAsgSelectionTool > m_jvtSelTool
Definition: JetJvtEfficiency.h:77
asg::AsgToolConfig::makePrivateTool
::StatusCode makePrivateTool(ToolHandle< T > &toolHandle) const
make a private tool with the given configuration
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CP::JetJvtEfficiency::m_jetEtaName
std::string m_jetEtaName
Definition: JetJvtEfficiency.h:90
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CP::JetJvtEfficiency::m_NNJvtParamFile
std::string m_NNJvtParamFile
Definition: JetJvtEfficiency.h:97
CP::JetJvtEfficiency::m_NNJvtCutFile
std::string m_NNJvtCutFile
Definition: JetJvtEfficiency.h:98
CP::NNJvt
@ NNJvt
Definition: IJetJvtEfficiency.h:24
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CP::JetJvtEfficiency::tagTruth
StatusCode tagTruth(const xAOD::IParticleContainer *jets, const xAOD::IParticleContainer *truthJets) override
Definition: JetJvtEfficiency.cxx:338
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
CP::SystematicsTool::recommendedSystematics
virtual SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of ...
Definition: SystematicsTool.cxx:47
CP::SystematicsTool::isAffectedBySystematic
virtual bool isAffectedBySystematic(const SystematicVariation &systematic) const
returns: whether this tool is affected by the given systematic guarantee: no-fail
Definition: SystematicsTool.cxx:32
CP::JetJvtEfficiency::m_isHS_decoration_name
std::string m_isHS_decoration_name
Definition: JetJvtEfficiency.h:88
CP::JetJvtEfficiency::passesJvtCut
virtual bool passesJvtCut(const xAOD::Jet &jet) const override
Definition: JetJvtEfficiency.cxx:300
CP::JetJvtEfficiency::m_passORAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_passORAcc
Definition: JetJvtEfficiency.h:107
CP::SystematicsTool::addRecommendedSystematic
StatusCode addRecommendedSystematic(const SystematicVariation &systematic)
effects: add a systematic to the list of recommended systematics failures: unsupported systematic
Definition: SystematicsTool.cxx:128
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CP::JetJvtEfficiency::m_jetContainerName
std::string m_jetContainerName
Definition: JetJvtEfficiency.h:96
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
CP::JvtTagger
JvtTagger
Definition: IJetJvtEfficiency.h:22
CP::JetJvtEfficiency::m_suppressOutputDependence
bool m_suppressOutputDependence
Definition: JetJvtEfficiency.h:114
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CP::fJvt
@ fJvt
Definition: IJetJvtEfficiency.h:25
CP::JetJvtEfficiency::m_ORdec
std::string m_ORdec
Definition: JetJvtEfficiency.h:93
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CP::JetJvtEfficiency::m_isHSAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_isHSAcc
Definition: JetJvtEfficiency.h:110
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CP::NONE
@ NONE
Definition: JetJvtEfficiency.h:27
CP::JetJvtEfficiency::m_jetEtaAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_jetEtaAcc
Definition: JetJvtEfficiency.h:106
asg::AsgComponentConfig::setTypeAndName
void setTypeAndName(const std::string &val_typeAndName)
set type and name at the same time
Definition: AsgComponentConfig.cxx:116
CheckAppliedSFs.systematics
def systematics
Definition: CheckAppliedSFs.py:231
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
CP::SystematicSet::insert
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Definition: SystematicSet.cxx:88
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CP::JetJvtEfficiency::m_h_EffHist
std::unique_ptr< TH2 > m_h_EffHist
Definition: JetJvtEfficiency.h:85
CP::JetJvtEfficiency::m_isHSDec
std::unique_ptr< SG::AuxElement::Decorator< char > > m_isHSDec
Definition: JetJvtEfficiency.h:109
CP::JetJvtEfficiency::m_jvtCut
float m_jvtCut
Definition: JetJvtEfficiency.h:102
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
CP::JetJvtEfficiency::m_truthJetContName
std::string m_truthJetContName
Definition: JetJvtEfficiency.h:89
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CP::JetJvtEfficiency::m_jetJvtMomentName
std::string m_jetJvtMomentName
Definition: JetJvtEfficiency.h:101
IJetDecorator::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CP::SystematicsTool::m_recommendedSystematics
SystematicSet m_recommendedSystematics
Definition: SystematicsTool.h:147
asg::AsgComponentConfig::setProperty
StatusCode setProperty(const std::string &name, const T &value)
set the given property
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::JetJvtEfficiency::m_maxPtForJvt
float m_maxPtForJvt
Definition: JetJvtEfficiency.h:91
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CP::JetJvtEfficiency::m_h_JvtHist
std::unique_ptr< TH2 > m_h_JvtHist
Definition: JetJvtEfficiency.h:84
CP::SystematicsTool::addRecommendedSystematics
StatusCode addRecommendedSystematics(const SystematicSet &systematics)
effects: add a SystematicSet to the recommended systematics.
Definition: SystematicsTool.cxx:152
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
CP::JetJvtEfficiency::m_useMuBinsSF
bool m_useMuBinsSF
Definition: JetJvtEfficiency.h:94
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
SG::DataProxy
Definition: DataProxy.h:45
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition: Assert.h:229
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CP::JetJvtEfficiency::m_sf_decoration_name
std::string m_sf_decoration_name
Definition: JetJvtEfficiency.h:87
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
CP::JetJvtEfficiency::getInefficiencyScaleFactor
virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet &jet, float &sf) override
Definition: JetJvtEfficiency.cxx:221
fitman.k
k
Definition: fitman.py:528
CP::SystematicRegistry::getInstance
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
Definition: SystematicRegistry.cxx:25