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, V, H > &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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &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_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_useMuBinsSF(false),
31  m_useDummySFs(false),
32  m_jvtCut(0),
33  m_jvtCutBorder(0),
34  m_jetEtaAcc(nullptr),
35  m_passORAcc(nullptr),
36  m_sfDec(nullptr),
37  m_isHSDec(nullptr),
38  m_isHSAcc(nullptr)
39  {
41  declareProperty( "NNJvtTool", m_NNJvtTool_handle, "NN Jvt tool" );
42  declareProperty( "WorkingPoint", m_wp = "Default" );
43  declareProperty( "SFFile", m_file = "" );
44  declareProperty( "JetContainerName", m_jetContainerName = "AntiKt4EMPFlowJets" );
45  declareProperty( "ScaleFactorDecorationName", m_sf_decoration_name = "" );
46  declareProperty( "OverlapDecorator", m_ORdec = "" );
47  declareProperty( "JetEtaName", m_jetEtaName = "DetectorEta" );
48  declareProperty( "MaxPtForJvt", m_maxPtForJvt = 60e3 );
49  declareProperty( "DoTruthReq", m_doTruthRequirement = true );
50  declareProperty( "TruthLabel", m_isHS_decoration_name = "isJvtHS" );
51  declareProperty( "TruthJetContainerName", m_truthJetContName = "AntiKt4TruthDressedWZJets" );
52  // Allow to configure NNJvt Tool directly instead via WP property
53  declareProperty( "NNJvtParamFile", m_NNJvtParamFile= "" );
54  declareProperty( "NNJvtCutFile", m_NNJvtCutFile= "" );
55  declareProperty( "SuppressOutputDependence", m_suppressOutputDependence = true );
56  // Legacy properties, kept for backwards compatibility
57  declareProperty( "JetJvtMomentName", m_jetJvtMomentName = "Jvt" );
58 
59 }

◆ 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 235 of file JetJvtEfficiency.cxx.

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

◆ applyEfficiencyScaleFactor()

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

Implements CP::IJetJvtEfficiency.

Definition at line 221 of file JetJvtEfficiency.cxx.

221  {
222  float sf = 0;
223  CorrectionCode result = this->getEfficiencyScaleFactor(jet,sf);
224  (*m_sfDec)(jet) = sf;
225  return result;
226 }

◆ applyInefficiencyScaleFactor()

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

Implements CP::IJetJvtEfficiency.

Definition at line 228 of file JetJvtEfficiency.cxx.

228  {
229  float sf = 0;
230  CorrectionCode result = this->getInefficiencyScaleFactor(jet,sf);
231  (*m_sfDec)(jet) = sf;
232  return result;
233 }

◆ 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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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 277 of file JetJvtEfficiency.cxx.

277  {
279  for(const xAOD::Jet* jet : jets)
280  passJvtHandle(*jet) = passesJvtCut(*jet);
281  return StatusCode::SUCCESS;
282 }

◆ 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 213 of file JetJvtEfficiency.cxx.

213  {
214  return m_jvtEffTool->getEfficiencyScaleFactor(jet, sf);
215 }

◆ getInefficiencyScaleFactor()

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

Implements CP::IJetJvtEfficiency.

Definition at line 217 of file JetJvtEfficiency.cxx.

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

◆ 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 61 of file JetJvtEfficiency.cxx.

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

◆ 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 301 of file JetJvtEfficiency.cxx.

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

◆ 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 296 of file JetJvtEfficiency.cxx.

296  {
297  ATH_MSG_DEBUG("In JetJvtEfficiency::passesJvtCut ()");
298  return bool(m_jvtSelTool->accept(&jet));
299 }

◆ print()

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

◆ recalculateScores()

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

Implements CP::IJetJvtEfficiency.

Definition at line 284 of file JetJvtEfficiency.cxx.

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

◆ 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 330 of file JetJvtEfficiency.cxx.

330  {
331  return m_jvtEffTool->applySystematicVariation(systSet);
332 }

◆ 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 334 of file JetJvtEfficiency.cxx.

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

◆ 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 91 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 87 of file JetJvtEfficiency.h.

◆ m_isHSAcc

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

Definition at line 109 of file JetJvtEfficiency.h.

◆ m_isHSDec

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

Definition at line 108 of file JetJvtEfficiency.h.

◆ m_jetContainerName

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

Definition at line 95 of file JetJvtEfficiency.h.

◆ m_jetEtaAcc

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

Definition at line 105 of file JetJvtEfficiency.h.

◆ m_jetEtaName

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

Definition at line 89 of file JetJvtEfficiency.h.

◆ m_jetJvtMomentName

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

Definition at line 100 of file JetJvtEfficiency.h.

◆ m_jvtCut

float CP::JetJvtEfficiency::m_jvtCut {}
private

Definition at line 101 of file JetJvtEfficiency.h.

◆ m_jvtCutBorder

float CP::JetJvtEfficiency::m_jvtCutBorder {}
private

Definition at line 102 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 90 of file JetJvtEfficiency.h.

◆ m_NNJvtCutFile

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

Definition at line 97 of file JetJvtEfficiency.h.

◆ m_NNJvtParamFile

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

Definition at line 96 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 92 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 111 of file JetJvtEfficiency.h.

◆ m_passORAcc

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

Definition at line 106 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 86 of file JetJvtEfficiency.h.

◆ m_sfDec

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

Definition at line 107 of file JetJvtEfficiency.h.

◆ m_suppressOutputDependence

bool CP::JetJvtEfficiency::m_suppressOutputDependence {}
private

Definition at line 113 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 88 of file JetJvtEfficiency.h.

◆ m_useDummySFs

bool CP::JetJvtEfficiency::m_useDummySFs {}
private

Definition at line 94 of file JetJvtEfficiency.h.

◆ m_useMuBinsSF

bool CP::JetJvtEfficiency::m_useMuBinsSF {}
private

Definition at line 93 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:102
beamspotnt.var
var
Definition: bin/beamspotnt.py:1393
CP::JetJvtEfficiency::m_doTruthRequirement
bool m_doTruthRequirement
Definition: JetJvtEfficiency.h:91
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:107
get_generator_info.result
result
Definition: get_generator_info.py:21
CP::JetJvtEfficiency::m_passJvtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_passJvtKey
Definition: JetJvtEfficiency.h:111
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
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
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
CheckAppliedSFs.systematics
systematics
Definition: CheckAppliedSFs.py:231
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
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
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:213
CP::JetJvtEfficiency::m_taggingAlg
JvtTagger m_taggingAlg
Definition: JetJvtEfficiency.h:83
CP::JetJvtEfficiency::m_useDummySFs
bool m_useDummySFs
Definition: JetJvtEfficiency.h:94
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:89
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CP::JetJvtEfficiency::m_NNJvtParamFile
std::string m_NNJvtParamFile
Definition: JetJvtEfficiency.h:96
CP::JetJvtEfficiency::m_NNJvtCutFile
std::string m_NNJvtCutFile
Definition: JetJvtEfficiency.h:97
CP::NNJvt
@ NNJvt
Definition: IJetJvtEfficiency.h:24
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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:334
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:209
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:87
CP::JetJvtEfficiency::passesJvtCut
virtual bool passesJvtCut(const xAOD::Jet &jet) const override
Definition: JetJvtEfficiency.cxx:296
CP::JetJvtEfficiency::m_passORAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_passORAcc
Definition: JetJvtEfficiency.h:106
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
CP::JetJvtEfficiency::m_jetContainerName
std::string m_jetContainerName
Definition: JetJvtEfficiency.h:95
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
CP::JvtTagger
JvtTagger
Definition: IJetJvtEfficiency.h:22
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
CP::JetJvtEfficiency::m_suppressOutputDependence
bool m_suppressOutputDependence
Definition: JetJvtEfficiency.h:113
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:92
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CP::JetJvtEfficiency::m_isHSAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_isHSAcc
Definition: JetJvtEfficiency.h:109
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:105
asg::AsgComponentConfig::setTypeAndName
void setTypeAndName(const std::string &val_typeAndName)
set type and name at the same time
Definition: AsgComponentConfig.cxx:116
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:240
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:108
CP::JetJvtEfficiency::m_jvtCut
float m_jvtCut
Definition: JetJvtEfficiency.h:101
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:88
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
h
CP::JetJvtEfficiency::m_jetJvtMomentName
std::string m_jetJvtMomentName
Definition: JetJvtEfficiency.h:100
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:90
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
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
CP::JetJvtEfficiency::m_useMuBinsSF
bool m_useMuBinsSF
Definition: JetJvtEfficiency.h:93
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
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
CP::JetJvtEfficiency::m_sf_decoration_name
std::string m_sf_decoration_name
Definition: JetJvtEfficiency.h:86
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:217
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