ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BTaggingSelectionTool Class Reference

#include <BTaggingSelectionTool.h>

Inheritance diagram for BTaggingSelectionTool:
Collaboration diagram for BTaggingSelectionTool:

Classes

struct  taggerproperties
 

Public Member Functions

 BTaggingSelectionTool (const std::string &name)
 Create a proper constructor for Athena. More...
 
StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual asg::AcceptData accept (const xAOD::IParticle *p) const override
 Get the decision using a generic IParticle pointer. More...
 
virtual asg::AcceptData accept (const xAOD::Jet &jet) const override
 
virtual asg::AcceptData accept (double, double, double) const override
 Get the decision using thet jet's pt and tag weight values. More...
 
virtual asg::AcceptData accept (double, double, double, double) const override
 
virtual asg::AcceptData accept (double, double, double, double, double) const override
 
virtual asg::AcceptData accept (double, double, double, double, double, double) const override
 
virtual int getQuantile (const xAOD::IParticle *) const override
 Decide in which quantile of the tag weight distribution the jet belongs (continuous tagging) The return value represents the bin index of the quantile distribution. More...
 
virtual int getQuantile (const xAOD::Jet &) const override
 
virtual int getQuantile (double, double, double) const override
 
virtual int getQuantile (double, double, double, double) const override
 
virtual CP::CorrectionCode getCutValue (double, double &cutval) const override
 
virtual CP::CorrectionCode getTaggerWeight (const xAOD::Jet &jet, double &tagweight) const override
 
virtual CP::CorrectionCode getTaggerWeight (double pb, double pc, double pu, double &tagweight) const override
 
virtual CP::CorrectionCode getTaggerWeight (double pb, double pc, double pu, double &tagweight, double ptau) const override
 
virtual CP::CorrectionCode getTaggerWeight (const xAOD::Jet &jet, double &weight, bool getCTagW) const override
 
virtual CP::CorrectionCode getTaggerWeight (double, double, double, double &weight, bool getCTagW, double=0.) const override
 
const asg::AcceptInfogetAcceptInfo () const override
 Declare the interface ID for this pure-virtual interface class to the Athena framework. More...
 
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
 

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...
 

Private Types

enum  Tagger {
  UNKNOWN, DL1, GN1, GN2,
  MV2c10
}
 
typedef double(xAOD::BTagging::* tagWeight_member_t) () const
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual bool checkRange (double, double, asg::AcceptData &) const
 Helper function that decides whether a jet belongs to the correct jet selection for b-tagging. More...
 
void InitializeTaggerVariables (std::string taggerName, std::string OP, TSpline3 *spline, TVector *constcut, double &fraction)
 
Tagger SetTaggerEnum (const std::string &taggerName)
 
StatusCode ExtractTaggerProperties (taggerproperties &tagger, const std::string &taggerName, const std::string &OP)
 
std::vector< std::string > split (const std::string &input, const char &delimiter)
 
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

bool m_initialised = false
 
bool m_ErrorOnTagWeightFailure = true
 
bool m_StoreNConstituents = false
 
bool m_continuous = false
 
bool m_continuous2D = false
 
bool m_useCTag = false
 
asg::AcceptInfo m_acceptinfo
 Object used to store the last decision. More...
 
double m_maxEta
 
double m_minPt
 
double m_maxRangePt
 
std::string m_CutFileName
 
std::string m_taggerName
 
std::string m_OP
 
std::string m_jetAuthor
 
std::string m_ContinuousBenchmarks
 
std::string m_wps_raw
 
TFile * m_inf
 
std::vector< double > m_continuouscuts
 
taggerproperties m_tagger
 
Tagger m_taggerEnum
 
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
 

Detailed Description

Definition at line 24 of file BTaggingSelectionTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ tagWeight_member_t

typedef double(xAOD::BTagging::* BTaggingSelectionTool::tagWeight_member_t) () const
private

Definition at line 27 of file BTaggingSelectionTool.h.

Member Enumeration Documentation

◆ Tagger

Enumerator
UNKNOWN 
DL1 
GN1 
GN2 
MV2c10 

Definition at line 114 of file BTaggingSelectionTool.h.

114 {UNKNOWN, DL1, GN1, GN2, MV2c10};

Constructor & Destructor Documentation

◆ BTaggingSelectionTool()

BTaggingSelectionTool::BTaggingSelectionTool ( const std::string &  name)

Create a proper constructor for Athena.

Create a constructor for standalone usage

Definition at line 42 of file BTaggingSelectionTool.cxx.

43  : asg::AsgTool( name ), m_acceptinfo( "JetSelection" )
44 {
45  m_initialised = false;
46  declareProperty( "MaxEta", m_maxEta = 2.5 );
47  declareProperty( "MinPt", m_minPt = -1 /*MeV*/);
48  declareProperty( "MaxRangePt", m_maxRangePt = 3000000 /*MeV*/);
49  declareProperty( "FlvTagCutDefinitionsFileName", m_CutFileName = "", "name of the files containing official cut definitions (uses PathResolver)");
50  declareProperty( "TaggerName", m_taggerName="", "tagging algorithm name");
51  declareProperty( "OperatingPoint", m_OP="", "operating point");
52  declareProperty( "JetAuthor", m_jetAuthor="", "jet collection");
53  declareProperty( "WorkingPointDefinitions", m_wps_raw="FixedCutBEff_85,FixedCutBEff_77,FixedCutBEff_70,FixedCutBEff_60", "Comma-separated list of tagger working points (in decreasing order of efficiency!) - required for 1D tagging purposes");
54  declareProperty( "ErrorOnTagWeightFailure", m_ErrorOnTagWeightFailure=true, "optionally ignore cases where the tagweight cannot be retrived. default behaviour is to give an error, switching to false will turn it into a warning");
55  declareProperty( "CutBenchmarksContinuousWP", m_ContinuousBenchmarks="", "comma separated list of tag bins that will be accepted as tagged: 1,2,3 etc.. ");
56  declareProperty( "useCTagging", m_useCTag=false, "Enabled only for FixedCut or Continuous WPs: define wether the cuts refer to b-tagging or c-tagging");
57 }

Member Function Documentation

◆ accept() [1/6]

asg::AcceptData BTaggingSelectionTool::accept ( const xAOD::IParticle p) const
overridevirtual

Get the decision using a generic IParticle pointer.

Implements IAsgSelectionTool.

Definition at line 431 of file BTaggingSelectionTool.cxx.

431  {
432 
433  // Check if this is a jet:
434  if( p->type() != xAOD::Type::Jet ) {
435  ATH_MSG_ERROR( "accept(...) Function received a non-jet" );
436  return asg::AcceptData (&m_acceptinfo);
437  }
438 
439  // Cast it to a jet:
440  const xAOD::Jet* jet = dynamic_cast< const xAOD::Jet* >( p );
441  if( ! jet ) {
442  ATH_MSG_FATAL( "accept(...) Failed to cast particle to jet" );
443  return asg::AcceptData (&m_acceptinfo);
444  }
445 
446  // Let the specific function do the work:
447  return accept( *jet );
448 }

◆ accept() [2/6]

asg::AcceptData BTaggingSelectionTool::accept ( const xAOD::Jet jet) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 450 of file BTaggingSelectionTool.cxx.

450  {
451  asg::AcceptData acceptData (&m_acceptinfo);
452 
453  if (! m_initialised) {
454  ATH_MSG_ERROR("BTaggingSelectionTool has not been initialised");
455  return acceptData;
456  }
457 
459  // We want at least 2 tracks in a track jet
460  acceptData.setCutResult( "NConstituents", jet.numConstituents() >= 2 );
461  }
462 
463  double pT = jet.pt();
464  double eta = jet.eta();
465 
466  if(m_continuous2D){
467  double taggerweight_b(-100);
468  double taggerweight_c(-100);
469  if( (getTaggerWeight( jet, taggerweight_b, false)!=CorrectionCode::Ok) ||
470  (getTaggerWeight( jet, taggerweight_c, true )!=CorrectionCode::Ok) )
471  return acceptData;
472 
473  return accept(pT, eta, taggerweight_b,taggerweight_c);
474  }
475  else{ //if here, we are in 1D mode
476  double taggerweight(-100);
477  if( getTaggerWeight( jet ,taggerweight, m_useCTag)!=CorrectionCode::Ok)
478  return acceptData;
479 
480  return accept(pT, eta, taggerweight);
481  }
482 }

◆ accept() [3/6]

asg::AcceptData BTaggingSelectionTool::accept ( double  pT,
double  eta,
double  tag_weight 
) const
overridevirtual

Get the decision using thet jet's pt and tag weight values.

Implements IBTaggingSelectionTool.

Definition at line 484 of file BTaggingSelectionTool.cxx.

485 {
486 
487  asg::AcceptData acceptData (&m_acceptinfo);
488 
489  if (! m_initialised) {
490  ATH_MSG_ERROR("BTaggingSelectionTool has not been initialised");
491  return acceptData;
492  }
493 
494  eta = std::abs(eta);
495  if (! checkRange(pT, eta, acceptData))
496  return acceptData;
497 
498  // After initialization, either m_tagger.spline or m_tagger.constcut should be non-zero
499  // Else, the initialization was incorrect and should be revisited
500  if(m_continuous){
501  for(size_t bin : m_tagger.benchmarks){
502  if(bin == 0){
503  throw std::logic_error("bin == 0 in the list of tagged bins. you should not be here. Wrong convention");
504  } else if ( bin == 1 ) {
505  if ( tag_weight < m_continuouscuts.at(bin-1) ) {
506  acceptData.setCutResult( "WorkingPoint", true );
507  }
508  } else if (bin > 1 && bin <= m_continuouscuts.size()){
509  if ( tag_weight > m_continuouscuts.at(bin-2) && tag_weight < m_continuouscuts.at(bin-1) ) {
510  acceptData.setCutResult( "WorkingPoint", true );
511  }
512  } else {
513  if ( tag_weight > m_continuouscuts.at(bin-2) ) {
514  acceptData.setCutResult( "WorkingPoint", true );
515  }
516  }
517  }
518  }
519  else{ //FixedCut
520  double cutvalue(DBL_MAX);
521  if( getCutValue(pT, cutvalue )!=CorrectionCode::Ok ){
522  return acceptData;
523  }
524 
525  if ( tag_weight < cutvalue ){
526  return acceptData;
527  }
528 
529  acceptData.setCutResult( "WorkingPoint", true );
530  }
531 
532  // Return the result:
533  return acceptData;
534 }

◆ accept() [4/6]

asg::AcceptData BTaggingSelectionTool::accept ( double  pT,
double  eta,
double  taggerWeight_b,
double  taggerWeight_c 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 536 of file BTaggingSelectionTool.cxx.

537 {
538  asg::AcceptData acceptData (&m_acceptinfo);
539 
540  if (! m_initialised) {
541  ATH_MSG_ERROR("BTaggingSelectionTool has not been initialised");
542  return acceptData;
543  }
544 
545  eta = std::abs(eta);
546 
547  if (! checkRange(pT, eta, acceptData))
548  return acceptData;
549 
550  for(auto bin : m_tagger.benchmarks){
551 
552  ATH_MSG_DEBUG("bin" <<bin <<" taggerWeight_c "
553  <<taggerWeight_c <<" taggerWeight_b "
554  <<taggerWeight_b);
555 
556  ATH_MSG_DEBUG(" c-cuts : " <<m_tagger.get2DCutValue(bin,0) <<" "
557  <<m_tagger.get2DCutValue(bin,1) <<" b-cuts : "
558  <<m_tagger.get2DCutValue(bin,2) <<" "
559  <<m_tagger.get2DCutValue(bin,3));
560 
561  if (taggerWeight_c > m_tagger.get2DCutValue(bin,0) && //ctag low
562  taggerWeight_c <= m_tagger.get2DCutValue(bin,1) && //ctag max
563  taggerWeight_b > m_tagger.get2DCutValue(bin,2) && //btag low
564  taggerWeight_b <= m_tagger.get2DCutValue(bin,3) ) //btag max
565  {
566  acceptData.setCutResult( "WorkingPoint", true ); // IF we arrived here, the jet is tagged
567  break;
568  }
569  } //for loop
570 
571  // Return the result:
572  return acceptData;
573 }

◆ accept() [5/6]

asg::AcceptData BTaggingSelectionTool::accept ( double  pT,
double  eta,
double  pb,
double  pc,
double  pu 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 575 of file BTaggingSelectionTool.cxx.

576 {
577  if (m_tagger.name == "GN2v01"){
578  asg::AcceptData acceptData (&m_acceptinfo);
579  ATH_MSG_ERROR("For GN2v01 tagger, there is a new tau claass in the NN output. Please update the accept() to accept(double pT, double eta, double pb, double pc, double pu, double ptau)");
580  return acceptData;
581  } else {
582  return accept(pT, eta, pb, pc, pu, 0.);
583  }
584 }

◆ accept() [6/6]

asg::AcceptData BTaggingSelectionTool::accept ( double  pT,
double  eta,
double  pb,
double  pc,
double  pu,
double  ptau 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 586 of file BTaggingSelectionTool.cxx.

587  {
588  asg::AcceptData acceptData (&m_acceptinfo);
589 
590  if (! m_initialised) {
591  ATH_MSG_ERROR("BTaggingSelectionTool has not been initialised");
592  return acceptData;
593  }
594 
595  eta = std::abs(eta);
596  if (! checkRange(pT, eta, acceptData))
597  return acceptData;
598 
599  // After initialization, either m_tagger.spline or m_tagger.constcut should be non-zero
600  // Else, the initialization was incorrect and should be revisited
601  double cutvalue(DBL_MAX);
602 
603  if( getCutValue(pT, cutvalue)!=CorrectionCode::Ok){
604  return acceptData;
605  };
606 
607  if(m_continuous2D){
608  double tagger_weight_b(-100);
609  double tagger_weight_c(-100);
610  if( ( getTaggerWeight(pb, pc, pu, tagger_weight_b, false, ptau)!=CorrectionCode::Ok) ||
611  ( getTaggerWeight(pb, pc, pu, tagger_weight_c, true, ptau)!=CorrectionCode::Ok) )
612  return acceptData;
613  return accept(pT, eta, tagger_weight_b, tagger_weight_c);
614  }
615  else{
616  double tagger_weight(-100);
617  if( getTaggerWeight(pb, pc, pu, tagger_weight, m_useCTag, ptau)!=CorrectionCode::Ok)
618  return acceptData;
619  if ( tagger_weight < cutvalue )
620  return acceptData;
621  }
622  //if you made it here, the jet is tagged
623  acceptData.setCutResult( "WorkingPoint", true );
624  return acceptData;
625  }

◆ checkRange()

bool BTaggingSelectionTool::checkRange ( double  pT,
double  eta,
asg::AcceptData acceptData 
) const
privatevirtual

Helper function that decides whether a jet belongs to the correct jet selection for b-tagging.

Definition at line 761 of file BTaggingSelectionTool.cxx.

762 {
763  // Do the |eta| cut:
764  if( std::abs(eta) > m_maxEta ) {
765  return false;
766  }
767  acceptData.setCutResult( "Eta", true );
768 
769  // Do the pT cut:
770  ATH_MSG_VERBOSE( "Jet pT: " << pT );
771  if( pT < m_minPt ) {
772  return false;
773  }
774  acceptData.setCutResult( "Pt", true );
775 
776  return true;
777 }

◆ 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  }

◆ 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; }

◆ ExtractTaggerProperties()

StatusCode BTaggingSelectionTool::ExtractTaggerProperties ( taggerproperties tagger,
const std::string &  taggerName,
const std::string &  OP 
)
private

Definition at line 224 of file BTaggingSelectionTool.cxx.

224  {
225 
226  TString cutname = OP;
227 
228  //set the name
229  tagger.name = taggerName;
230 
231  if ("FlatBEff"==cutname(0,8) || "HybBEff"==cutname(0,7) ){
232  cutname = taggerName+"/"+m_jetAuthor+"/"+OP+"/cutprofile";
233  tagger.spline = dynamic_cast<TSpline3*> (m_inf->Get(cutname));
234  if (tagger.spline == nullptr){
235  ATH_MSG_ERROR( "Invalid operating point" );
236  return StatusCode::FAILURE;
237  }
238  tagger.constcut = nullptr;
239  }
240  else {
241  cutname = taggerName+"/"+m_jetAuthor+"/"+OP+"/cutvalue";
242  tagger.constcut = dynamic_cast<TVector*> (m_inf->Get(cutname));
243  if (tagger.constcut == nullptr){
244  ATH_MSG_ERROR( "Invalid operating point" );
245  return StatusCode::FAILURE;
246  }
247  tagger.spline = nullptr;
248  }
249 
250  //retrive the "fraction" used in the DL1 log likelihood from the CDI, if its not there, use the hard coded values
251  // (backwards compatibility)
252  if( (m_taggerEnum == Tagger::DL1) || (m_taggerEnum == Tagger::GN1) || (m_taggerEnum == Tagger::GN2)){
253 
254  TString fraction_data_name = taggerName+"/"+m_jetAuthor+"/"+OP+"/fraction";
255  TVector *fraction_data = dynamic_cast<TVector*> (m_inf->Get(fraction_data_name));
256 
257  double fraction = -1;
258  if(fraction_data!=nullptr){
259  fraction = fraction_data[0](0);
260  }else{
261  if("DL1" ==taggerName){ fraction = 0.08; }
262  if("DL1mu" ==taggerName){ fraction = 0.08; }
263  if("DL1rnn" ==taggerName){ fraction = 0.03; }
264  }
265  tagger.fraction_c = fraction;
266  tagger.fraction_b = fraction;
267 
268  double fraction_tau = 0.;
269  double fraction_tau_cTag = 0.;
270  TString fraction_tau_name = taggerName+"/"+m_jetAuthor+"/"+OP+"/fraction_tau";
271  TVector *fraction_tau_data = dynamic_cast<TVector*> (m_inf->Get(fraction_tau_name));
272  if (m_taggerEnum == Tagger::GN2 && !(taggerName.find("GN2v00") != std::string::npos)){
273  if( fraction_tau_data != nullptr ) {
274  if (m_useCTag){
275  // tau fraction for c-tagging
276  fraction_tau_cTag = fraction_tau_data[0](0);
277  }
278  else{
279  // tau fraction for b-tagging
280  fraction_tau = fraction_tau_data[0](0);
281  }
282  }
283  else {
284  // For GN2v01 taggers and onwards the fraction_tau should be in the CDI file
285  ATH_MSG_ERROR("Tagger fraction_tau is not available");
286  return StatusCode::FAILURE;
287  }
288  }
289  tagger.fraction_tau = fraction_tau;
290  tagger.fraction_tau_cTag = fraction_tau_cTag;
291 
292  delete fraction_data;
293  delete fraction_tau_data;
294  }
295  return StatusCode::SUCCESS;
296 }

◆ 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

◆ getAcceptInfo()

const asg::AcceptInfo& BTaggingSelectionTool::getAcceptInfo ( ) const
inlineoverridevirtual

Declare the interface ID for this pure-virtual interface class to the Athena framework.

Method to get the AcceptInfo to query what cuts are defined.

Implements IAsgSelectionTool.

Definition at line 63 of file BTaggingSelectionTool.h.

63 {return m_acceptinfo;}

◆ getCutValue()

CorrectionCode BTaggingSelectionTool::getCutValue ( double  pT,
double &  cutval 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 779 of file BTaggingSelectionTool.cxx.

780 {
781  cutval = DBL_MAX;
782 
783  // flat cut for out of range pTs
784  if (pT>m_maxRangePt)
785  pT = m_maxRangePt;
786 
787  taggerproperties tagger ATLAS_THREAD_SAFE = m_tagger;
788 
789  if (tagger.spline != nullptr && tagger.constcut == nullptr) {
790  pT = pT/1000.0;
791  double maxsplinept = tagger.spline->GetXmax();
792  if (pT>maxsplinept){ pT = maxsplinept; }
793  cutval = tagger.spline->Eval(pT);
794  }
795 
796  else if (tagger.constcut != nullptr && tagger.spline == nullptr) {
797  cutval = tagger.constcut[0](0);
798  }
799  else{
800  ATH_MSG_ERROR( "Bad cut configuration!" );
801  return CorrectionCode::Error;
802  }
803 
804 
805  ATH_MSG_VERBOSE( "Cut value " << cutval );
806 
807  return CorrectionCode::Ok;
808 }

◆ 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.

◆ getQuantile() [1/4]

int BTaggingSelectionTool::getQuantile ( const xAOD::IParticle p) const
overridevirtual

Decide in which quantile of the tag weight distribution the jet belongs (continuous tagging) The return value represents the bin index of the quantile distribution.

Implements IBTaggingSelectionTool.

Definition at line 627 of file BTaggingSelectionTool.cxx.

627  {
628  // Check if this is a jet:
629 
630 
631  if( p->type() != xAOD::Type::Jet ) {
632  ATH_MSG_ERROR( "accept(...) Function received a non-jet" );
633  return -1;
634  }
635 
636  // Cast it to a jet:
637  const xAOD::Jet* jet = dynamic_cast< const xAOD::Jet* >( p );
638  if( ! jet ) {
639  ATH_MSG_FATAL( "accept(...) Failed to cast particle to jet" );
640  return -1;
641  }
642 
643  // Let the specific function do the work:
644  return getQuantile( *jet );
645 }

◆ getQuantile() [2/4]

int BTaggingSelectionTool::getQuantile ( const xAOD::Jet jet) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 647 of file BTaggingSelectionTool.cxx.

647  {
648  double pT = jet.pt();
649  double eta = std::abs( jet.eta() );
650  int quantile = -1;
651 
652  if (m_continuous2D){
653  double tag_weight_b(-100.);
654  double tag_weight_c(-100.);
655  if ( (getTaggerWeight(jet, tag_weight_b, false) == CP::CorrectionCode::Error) ||
656  (getTaggerWeight(jet, tag_weight_c, true ) == CP::CorrectionCode::Error) ){
657  ATH_MSG_WARNING("getQuantile: Failed to retrieve tag weight for Continuous2D!");
658  return -1;
659  }
660  quantile = getQuantile(pT, eta, tag_weight_b, tag_weight_c );
661  }
662  else{
663  // Retrieve the tagger weight which was assigned to the jet
664  double tag_weight(-100.);
666  ATH_MSG_WARNING("getQuantile: Failed to retrieve "+m_taggerName+" weight!");
667  return -1;
668  }
669  ATH_MSG_VERBOSE( m_taggerName << " " << tag_weight);
670  quantile = getQuantile(pT, eta, tag_weight);
671  }
672  return quantile;
673 }

◆ getQuantile() [3/4]

int BTaggingSelectionTool::getQuantile ( double  pT,
double  eta,
double  tag_weight 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 676 of file BTaggingSelectionTool.cxx.

677 {
678  if (! m_initialised) {
679  ATH_MSG_ERROR("BTaggingSelectionTool has not been initialised");
680  }
682  // Cheatsheet:
683  // With n WPs, (from highest to lowest) A1 , A2, A3, ..., An
684  // return -1 if not in b-tagging acceptance
685  // return 1 if between 100% and A1 (untagged)
686  // return 2 if between A1 and A2 (tagged at the A1 WP)
687  // return 3 if between A2 and A3 (tagged at the A2 WP)
688  // ...
689  // return n if between An-1 and An (tagged at the An-1 WP)
690  // return n+1 if between An and 0% (tagged at the An WP)
692 
693  int bin_index = -1;
694 
695  // First, check if the jet is in acceptance
696  asg::AcceptData acceptData (&m_acceptinfo);
697  if (! checkRange(pT, eta,acceptData)) {
698  return bin_index;
699  }
700 
701  // Now we need to check each threshold in the PCBT vector
702  // and return the maximum WP bin index (1,2,...,n).
703  // Instead of checking low<tag_weight<high for each bin,
704  // we simply check tag_weight<high and therefore range
705  // from vector indices 1 to vector.size()
706  bin_index = 1; // setting the ones that pass selection you have default as 1
707  for (std::size_t i=0; i<m_continuouscuts.size(); i++) {
708  if ( tag_weight > m_continuouscuts.at(i) ) {
709  bin_index++;
710  } else {
711  break;
712  }
713  }
714  return bin_index;
715 }

◆ getQuantile() [4/4]

int BTaggingSelectionTool::getQuantile ( double  pT,
double  eta,
double  tag_weight_b,
double  tag_weight_c 
) const
overridevirtual

Cheatsheet: returns 4 if pass B_tight (?) returns 3 if pass B_loose returns 2 if pass C_tight + fail B_loose returns 1 if pass C_loose + fail C_tight + fail B_loose returns 0 if fail C_loose + fail B_loose return -1 not in b-tagging acceptance

Implements IBTaggingSelectionTool.

Definition at line 717 of file BTaggingSelectionTool.cxx.

718 {
728 
729  //More details here: https://indico.cern.ch/event/1116952/#4-mr49953-implements-the-conti
730 
731  ATH_MSG_DEBUG("inside getQuantile 2D " <<pT <<" " <<eta <<" " <<tag_weight_b <<" " <<tag_weight_c);
732  int bin_index(-1);
733 
734  asg::AcceptData acceptData (&m_acceptinfo);
735  if (! checkRange(pT, eta, acceptData)) return bin_index;
736 
737  int ncuts = m_tagger.cuts2D->GetNrows();
738  ATH_MSG_VERBOSE("ncuts: " <<ncuts);
739 
740  //loop over all the cuts
741  for(int i = 0; i < ncuts ; i++){
742  double c_cut_low = m_tagger.get2DCutValue(i,0);
743  double c_cut_hig = m_tagger.get2DCutValue(i,1);
744  double b_cut_low = m_tagger.get2DCutValue(i,2);
745  double b_cut_hig = m_tagger.get2DCutValue(i,3);
746 
747  ATH_MSG_DEBUG("bin " <<i <<" c_cut low " <<c_cut_low <<" c_cut hig " <<c_cut_hig <<" c_cut low " <<b_cut_low <<" b_ct hig" <<b_cut_hig);
748  if (tag_weight_c > c_cut_low &&
749  tag_weight_c <= c_cut_hig &&
750  tag_weight_b > b_cut_low &&
751  tag_weight_b <= b_cut_hig){
752  bin_index = i;
753  break;
754  }
755  }
756 
757  ATH_MSG_VERBOSE("bin_index " <<bin_index);
758  return bin_index;
759 }

◆ getTaggerWeight() [1/5]

CorrectionCode BTaggingSelectionTool::getTaggerWeight ( const xAOD::Jet jet,
double &  tagweight 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 298 of file BTaggingSelectionTool.cxx.

298  {
299  return getTaggerWeight(jet, tagweight, m_useCTag);
300 }

◆ getTaggerWeight() [2/5]

CorrectionCode BTaggingSelectionTool::getTaggerWeight ( const xAOD::Jet jet,
double &  weight,
bool  getCTagW 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 302 of file BTaggingSelectionTool.cxx.

302  {
303 
304  std::string taggerName = m_tagger.name;
305  // following taggerName change is needed given different name is used for GN2v00 in derivation and in CDI
306  if (taggerName == "GN2v00LegacyWP" || taggerName == "GN2v00NewAliasWP"){
307  taggerName = "GN2v00";
308  }
309  tagweight = -100.;
310 
311  if(!m_continuous2D && (getCTagW != m_useCTag) ){
312  ATH_MSG_ERROR("Difference between initialisation and getTaggerWeight request! useCTagging property set to " <<m_useCTag <<" while getTaggerWeight use c-tag is set to " <<getCTagW <<".");
313  return CorrectionCode::Error;
314  }
315 
316  if ( m_taggerEnum == Tagger::MV2c10 ){
317 
319 
320  if ((!btag) || (!btag->MVx_discriminant(taggerName, tagweight))){
322  ATH_MSG_ERROR("Failed to retrieve "+taggerName+" weight!");
323  return CorrectionCode::Error;
324  }else{
325  ATH_MSG_WARNING("Failed to retrieve "+taggerName+" weight!");
326  return CorrectionCode::Ok;
327  }
328  }
329  ATH_MSG_VERBOSE( taggerName << " " << tagweight );
330  return CorrectionCode::Ok;
331  } //MV2
332  else{
333  //DL1r or DL1
334  double dl1_pb(-10.);
335  double dl1_pc(-10.);
336  double dl1_pu(-10.);
337  double dl1_ptau(0.);
338 
340 
341  if ((!btag)){
342  ATH_MSG_ERROR("Failed to retrieve the BTagging information");
343  return CorrectionCode::Error;
344  }
345 
346  if ( (!btag->pb(taggerName, dl1_pb ))
347  || (!btag->pc(taggerName, dl1_pc ))
348  || (!btag->pu(taggerName, dl1_pu ))
349  || (taggerName=="GN2v01" && !btag->ptau(taggerName, dl1_ptau))){
350 
352  ATH_MSG_ERROR("Failed to retrieve "+taggerName+" weight!");
353  return CorrectionCode::Error;
354  }else{
355  ATH_MSG_WARNING("Failed to retrieve "+taggerName+" weight!");
356  return CorrectionCode::Ok;
357  }
358  }
359 
360  return getTaggerWeight(dl1_pb, dl1_pc, dl1_pu, tagweight, getCTagW, dl1_ptau);
361 
362  }
363 
364  //if we got here the tagger name is not configured properly
365  ATH_MSG_ERROR("BTaggingSelectionTool doesn't support tagger: "+m_taggerName);
366  return CorrectionCode::Error;
367 
368 }

◆ getTaggerWeight() [3/5]

CorrectionCode BTaggingSelectionTool::getTaggerWeight ( double  pb,
double  pc,
double  pu,
double &  tagweight 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 370 of file BTaggingSelectionTool.cxx.

370  {
371  if (m_tagger.name == "GN2v01"){
372  ATH_MSG_ERROR("For GN2v01 tagger, there is a new tau claass in the NN output. Please update your getTaggerWeight() to getTaggerWeight( double pb, double pc, double pu, double & tagweight, double ptau)");
373  return CorrectionCode::Error;
374  } else {
375  return getTaggerWeight(pb, pc, pu, tagweight, m_useCTag, 0.);
376  }
377 }

◆ getTaggerWeight() [4/5]

CorrectionCode BTaggingSelectionTool::getTaggerWeight ( double  pb,
double  pc,
double  pu,
double &  tagweight,
double  ptau 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 379 of file BTaggingSelectionTool.cxx.

379  {
380  return getTaggerWeight(pb, pc, pu, tagweight, m_useCTag, ptau);
381 }

◆ getTaggerWeight() [5/5]

CorrectionCode BTaggingSelectionTool::getTaggerWeight ( double  pb,
double  pc,
double  pu,
double &  weight,
bool  getCTagW,
double  ptau = 0. 
) const
overridevirtual

Implements IBTaggingSelectionTool.

Definition at line 383 of file BTaggingSelectionTool.cxx.

383  {
384 
385  std::string taggerName = m_tagger.name;
386 
387  if(!m_continuous2D && (getCTagW != m_useCTag) ){
388  ATH_MSG_ERROR("Difference between initialisation and getTaggerWeight request! useCTagging property set to " <<m_useCTag <<" while getTaggerWeight use c-tag is set to " <<getCTagW <<".");
389  return CorrectionCode::Error;
390  }
391 
392  tagweight = -100.;
393  if( (m_taggerEnum == Tagger::DL1) || (m_taggerEnum == Tagger::GN1) || (m_taggerEnum == Tagger::GN2)){
394 
395  bool valid_input = (!std::isnan(pu) && pb>=0 && pc>=0 && pu>=0 && ptau>=0);
396 
397  if (!valid_input){
399  ATH_MSG_ERROR("Invalid inputs for "+taggerName+" pb " << pb << " pc " << pc << " pu " << pu << " ptau " << ptau << " ");
400  return CorrectionCode::Error;
401  }else{
402  ATH_MSG_WARNING("Invalid inputs for "+taggerName+" pb " << pb << " pc " << pc << " pu " << pu << " ptau " << ptau << " ");
403  return CorrectionCode::Ok;
404  }
405  }
406 
407  if(getCTagW){
409  }
410  else{
411  tagweight = log(pb / (m_tagger.fraction_c * pc + (1. - m_tagger.fraction_c - m_tagger.fraction_tau) * pu + m_tagger.fraction_tau * ptau) );
412  }
413 
414  ATH_MSG_VERBOSE( "pb " << pb );
415  ATH_MSG_VERBOSE( "pc " << pc );
416  ATH_MSG_VERBOSE( "pu " << pu );
417  ATH_MSG_VERBOSE( "ptau" << ptau );
418  ATH_MSG_VERBOSE( "tagweight " << tagweight );
419 
420  return CorrectionCode::Ok;
421  }
422 
423  //if we got here the tagger name is not configured properly
424  ATH_MSG_ERROR("this call to getTaggerWeight only works for DL1/GNx taggers");
425  return CorrectionCode::Error;
426 
427 }

◆ initialize()

StatusCode BTaggingSelectionTool::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 59 of file BTaggingSelectionTool.cxx.

59  {
60  m_initialised = true;
61 
62  if (""==m_OP){
63  ATH_MSG_ERROR( "BTaggingSelectionTool wasn't given a working point name" );
64  return StatusCode::FAILURE;
65  }
66 
67  TString pathtofile = PathResolverFindCalibFile(m_CutFileName);
68  m_inf = TFile::Open(pathtofile, "read");
69  if (0==m_inf) {
70 
71  ATH_MSG_ERROR( "BTaggingSelectionTool couldn't access tagging cut definitions" );
72  return StatusCode::FAILURE;
73  }
74 
75  // check the CDI file for the selected tagger and jet collection
76  TString check_CDI = m_taggerName;
77  if(!m_inf->Get(check_CDI)){
78  ATH_MSG_ERROR( "Tagger: "+m_taggerName+" not found in this CDI file: "+m_CutFileName);
79  return StatusCode::FAILURE;
80  }
81  check_CDI = m_taggerName+"/"+m_jetAuthor;
82  if(!m_inf->Get(check_CDI)){
83  ATH_MSG_ERROR( "Tagger: "+m_taggerName+" and Jet Collection : "+m_jetAuthor+" not found in this CDI file: "+m_CutFileName);
84  return StatusCode::FAILURE;
85  }
86 
87  //set taggerEnum to avid string comparison:
89 
90  //special requirement for VR TrackJets:
91  if((m_jetAuthor.find("AntiKt2PV0TrackJets") != std::string::npos) ||
92  (m_jetAuthor.find("AntiKt4PV0TrackJets") != std::string::npos) ||
93  (m_jetAuthor.find("AntiKtVR30Rmax4Rmin02TrackJets") != std::string::npos)) {
94  m_StoreNConstituents = true;
95  }
96 
97  // Change the minPt cut if the user didn't touch it
98  if (m_minPt < 0){
99  ATH_MSG_ERROR( "Tagger: "+m_taggerName+" and Jet Collection : "+m_jetAuthor+" do not have a minimum jet pT cut set.");
100  return StatusCode::FAILURE;
101  }
102 
103 
104  // Operating point reading
105  TString cutname = m_OP;
106  m_continuous = false;
107  m_continuous2D = false;
108 
109  if(cutname.Contains("Continuous2D")){
110  ATH_MSG_INFO("Working with Continuous2D WP.");
111  m_continuous = true;
112  m_continuous2D = true;
113  m_useCTag = false; //important for backward compatibility in getTaggerWeight methods.
114  cutname = m_taggerName+"/"+m_jetAuthor+"/Continuous2D/cutvalue";
116  TMatrixD* matrix = dynamic_cast<TMatrixD*> (m_inf->Get(cutname));
118 
119  for (int bin = 0; bin < m_tagger.cuts2D->GetNrows(); bin++)
120  ATH_MSG_DEBUG("INITIALIZATION c-cuts : " <<m_tagger.get2DCutValue(bin,0) <<" "
121  <<m_tagger.get2DCutValue(bin,1) <<" b-cuts : "
122  <<m_tagger.get2DCutValue(bin,2) <<" "
123  <<m_tagger.get2DCutValue(bin,3));
124 
125  if (m_tagger.cuts2D == nullptr){
126  ATH_MSG_ERROR( "Invalid operating point" );
127  return StatusCode::FAILURE;
128  }
129 
130  m_tagger.spline = nullptr;
131 
132  TString fraction_data_name = m_taggerName+"/"+m_jetAuthor+"/Continuous2D/fraction_b";
133  TVector *fraction_data = dynamic_cast<TVector*> (m_inf->Get(fraction_data_name));
134  if(fraction_data!=nullptr){
135  m_tagger.fraction_b = fraction_data[0](0);
136  }
137  else{
138  ATH_MSG_ERROR("Tagger fraction_b in Continuous2D WP not available");
139  return StatusCode::FAILURE;
140  }
141 
142  //now the c-fraction:
143  fraction_data_name = m_taggerName+"/"+m_jetAuthor+"/Continuous2D/fraction_c";
144  fraction_data = dynamic_cast<TVector*> (m_inf->Get(fraction_data_name));
145  if(fraction_data!=nullptr){
146  m_tagger.fraction_c = fraction_data[0](0);}
147  else{
148  ATH_MSG_ERROR("Tagger fraction_c in Continuous2D WP not available");
149  return StatusCode::FAILURE;
150  }
151  //now the tau-fraction if the tagger is GN2*:
152  if ( m_taggerName == "GN2v01" ){
153  fraction_data_name = m_taggerName+"/"+m_jetAuthor+"/Continuous2D/fraction_tau";
154  TString fraction_data_name_cTag = m_taggerName+"/"+m_jetAuthor+"/Continuous2D/fraction_tau_cTag";
155  fraction_data = dynamic_cast<TVector*> (m_inf->Get(fraction_data_name));
156  TVector *fraction_data_cTag = dynamic_cast<TVector*> (m_inf->Get(fraction_data_name_cTag));
157  if(fraction_data!=nullptr){
158  m_tagger.fraction_tau = fraction_data[0](0);
159  }else{
160  ATH_MSG_ERROR("Tagger fraction_tau in Continuous2D WP not available");
161  return StatusCode::FAILURE;
162  }
163  if(fraction_data_cTag!=nullptr){
164  m_tagger.fraction_tau_cTag = fraction_data_cTag[0](0);
165  }else{
166  ATH_MSG_ERROR("Tagger fraction_tau_cTag in Continuous2D WP not available");
167  return StatusCode::FAILURE;
168  }
169  delete fraction_data_cTag;
170  }
171  delete fraction_data;
172  } //Continuous2D
173  else if ("Continuous"==cutname(0,10)){ // For continuous tagging load all flat-cut WPs
174  if(m_useCTag)
175  ATH_MSG_WARNING( "Running in Continuous WP and using 1D c-tagging");
176  m_continuous = true;
177  // For GN2v01, we have different WPs than the default ones.
178  if ( m_taggerName == "GN2v01" )
179  m_wps_raw="FixedCutBEff_90,FixedCutBEff_85,FixedCutBEff_77,FixedCutBEff_70,FixedCutBEff_65";
180  std::vector<std::string> workingpoints = split(m_wps_raw, ',');
181  std::sort(workingpoints.begin(), workingpoints.end());
182  std::reverse(workingpoints.begin(), workingpoints.end()); // put in descending order
183  for(const std::string& wp : workingpoints){
184  cutname = m_taggerName + "/" + m_jetAuthor + "/" + wp + "/cutvalue";
185  m_tagger.constcut = dynamic_cast<TVector*> (m_inf->Get(cutname));
186  if (m_tagger.constcut != nullptr) {
187  m_continuouscuts.push_back(m_tagger.constcut[0](0));
188  } else {
189  ATH_MSG_ERROR( "Continuous tagging is trying to use an invalid operating point: " + wp );
190  return StatusCode::FAILURE;
191  }
192  }
193 
194  //The WP is not important. This is just to retrieve the c-fraction.
195  ANA_CHECK(ExtractTaggerProperties(m_tagger, m_taggerName, workingpoints.at(0)));
196 
197  } else { // FixedCut Working Point: load only one WP
198  if(m_useCTag){
199  ATH_MSG_WARNING( "Running in FixedCut WP and using c-tagging");
200  }
202  }
203 
204  //set the accept working points, jets in these pseudo-continuous bins will be accepted
205  if(m_continuous){
206  std::vector<std::string> tag_benchmarks_names = split(m_ContinuousBenchmarks, ',');
207  std::vector<int> tag_benchmarks;
208  for (const std::string& tagbin : tag_benchmarks_names){
209  tag_benchmarks.push_back(std::atoi(tagbin.c_str()));
210  ATH_MSG_INFO("adding " <<tag_benchmarks.back() <<" as tagged bin ");
211  }
212  m_tagger.benchmarks = tag_benchmarks;
213  }
214 
215  m_inf->Close();
216 
217  m_acceptinfo.addCut( "Eta", "Selection of jets according to their pseudorapidity" );
218  m_acceptinfo.addCut( "Pt", "Selection of jets according to their transverse momentum" );
219  m_acceptinfo.addCut( "WorkingPoint", "Working point for flavour-tagging of jets according to their b-tagging weight" );
220 
221  return StatusCode::SUCCESS;
222 }

◆ InitializeTaggerVariables()

void BTaggingSelectionTool::InitializeTaggerVariables ( std::string  taggerName,
std::string  OP,
TSpline3 *  spline,
TVector *  constcut,
double &  fraction 
)
private

◆ 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.

◆ 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.

◆ print()

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

◆ 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  }

◆ SetTaggerEnum()

Tagger BTaggingSelectionTool::SetTaggerEnum ( const std::string &  taggerName)
inlineprivate

Definition at line 117 of file BTaggingSelectionTool.h.

117  {
118  if(taggerName.find("DL1") != std::string::npos) return Tagger::DL1;
119  else if(taggerName.find("GN1") != std::string::npos) return Tagger::GN1;
120  else if(taggerName.find("GN2") != std::string::npos) return Tagger::GN2;
121  else if(taggerName == "MV2c10") return Tagger::MV2c10;
122  else
123  ATH_MSG_ERROR("Tagger Name NOT supported.");
124  return Tagger::UNKNOWN;
125  };

◆ split()

std::vector< std::string > BTaggingSelectionTool::split ( const std::string &  input,
const char &  delimiter 
)
private

Definition at line 810 of file BTaggingSelectionTool.cxx.

810  {
811  std::vector<std::string> v;
812  std::istringstream buf(input);
813  for(std::string token; std::getline(buf, token, delimiter); )
814  v.push_back(token);
815  return v;
816 }

◆ 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.

◆ 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_acceptinfo

asg::AcceptInfo BTaggingSelectionTool::m_acceptinfo
private

Object used to store the last decision.

Definition at line 77 of file BTaggingSelectionTool.h.

◆ m_continuous

bool BTaggingSelectionTool::m_continuous = false
private

Definition at line 73 of file BTaggingSelectionTool.h.

◆ m_continuous2D

bool BTaggingSelectionTool::m_continuous2D = false
private

Definition at line 74 of file BTaggingSelectionTool.h.

◆ m_ContinuousBenchmarks

std::string BTaggingSelectionTool::m_ContinuousBenchmarks
private

Definition at line 87 of file BTaggingSelectionTool.h.

◆ m_continuouscuts

std::vector<double> BTaggingSelectionTool::m_continuouscuts
private

Definition at line 91 of file BTaggingSelectionTool.h.

◆ m_CutFileName

std::string BTaggingSelectionTool::m_CutFileName
private

Definition at line 83 of file BTaggingSelectionTool.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_ErrorOnTagWeightFailure

bool BTaggingSelectionTool::m_ErrorOnTagWeightFailure = true
private

Definition at line 71 of file BTaggingSelectionTool.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_inf

TFile* BTaggingSelectionTool::m_inf
private

Definition at line 90 of file BTaggingSelectionTool.h.

◆ m_initialised

bool BTaggingSelectionTool::m_initialised = false
private

Definition at line 70 of file BTaggingSelectionTool.h.

◆ m_jetAuthor

std::string BTaggingSelectionTool::m_jetAuthor
private

Definition at line 86 of file BTaggingSelectionTool.h.

◆ m_maxEta

double BTaggingSelectionTool::m_maxEta
private

Definition at line 79 of file BTaggingSelectionTool.h.

◆ m_maxRangePt

double BTaggingSelectionTool::m_maxRangePt
private

Definition at line 81 of file BTaggingSelectionTool.h.

◆ m_minPt

double BTaggingSelectionTool::m_minPt
private

Definition at line 80 of file BTaggingSelectionTool.h.

◆ m_OP

std::string BTaggingSelectionTool::m_OP
private

Definition at line 85 of file BTaggingSelectionTool.h.

◆ m_StoreNConstituents

bool BTaggingSelectionTool::m_StoreNConstituents = false
private

Definition at line 72 of file BTaggingSelectionTool.h.

◆ m_tagger

taggerproperties BTaggingSelectionTool::m_tagger
private

Definition at line 112 of file BTaggingSelectionTool.h.

◆ m_taggerEnum

Tagger BTaggingSelectionTool::m_taggerEnum
private

Definition at line 115 of file BTaggingSelectionTool.h.

◆ m_taggerName

std::string BTaggingSelectionTool::m_taggerName
private

Definition at line 84 of file BTaggingSelectionTool.h.

◆ m_useCTag

bool BTaggingSelectionTool::m_useCTag = false
private

Definition at line 75 of file BTaggingSelectionTool.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_wps_raw

std::string BTaggingSelectionTool::m_wps_raw
private

Definition at line 88 of file BTaggingSelectionTool.h.


The documentation for this class was generated from the following files:
BTaggingSelectionTool::m_StoreNConstituents
bool m_StoreNConstituents
Definition: BTaggingSelectionTool.h:72
xAOD::BTagging_v1::ptau
bool ptau(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:374
python.StoreID.UNKNOWN
int UNKNOWN
Definition: StoreID.py:16
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
BTaggingSelectionTool::taggerproperties::fraction_b
double fraction_b
Definition: BTaggingSelectionTool.h:95
BTaggingSelectionTool::m_wps_raw
std::string m_wps_raw
Definition: BTaggingSelectionTool.h:88
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
BTaggingSelectionTool::UNKNOWN
@ UNKNOWN
Definition: BTaggingSelectionTool.h:114
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
BTaggingSelectionTool::m_continuous
bool m_continuous
Definition: BTaggingSelectionTool.h:73
BTaggingSelectionTool::m_maxRangePt
double m_maxRangePt
Definition: BTaggingSelectionTool.h:81
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
BTaggingSelectionTool::m_initialised
bool m_initialised
Definition: BTaggingSelectionTool.h:70
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
BTaggingSelectionTool::MV2c10
@ MV2c10
Definition: BTaggingSelectionTool.h:114
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
BTaggingSelectionTool::m_continuous2D
bool m_continuous2D
Definition: BTaggingSelectionTool.h:74
BTaggingSelectionTool::m_continuouscuts
std::vector< double > m_continuouscuts
Definition: BTaggingSelectionTool.h:91
BTaggingSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *p) const override
Get the decision using a generic IParticle pointer.
Definition: BTaggingSelectionTool.cxx:431
bin
Definition: BinsDiffFromStripMedian.h:43
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
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
BTaggingSelectionTool::m_taggerEnum
Tagger m_taggerEnum
Definition: BTaggingSelectionTool.h:115
BTaggingSelectionTool::m_jetAuthor
std::string m_jetAuthor
Definition: BTaggingSelectionTool.h:86
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
BTaggingSelectionTool::m_ErrorOnTagWeightFailure
bool m_ErrorOnTagWeightFailure
Definition: BTaggingSelectionTool.h:71
BTaggingSelectionTool::m_acceptinfo
asg::AcceptInfo m_acceptinfo
Object used to store the last decision.
Definition: BTaggingSelectionTool.h:77
BTaggingSelectionTool::taggerproperties::benchmarks
std::vector< int > benchmarks
Definition: BTaggingSelectionTool.h:102
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
BTaggingSelectionTool::m_minPt
double m_minPt
Definition: BTaggingSelectionTool.h:80
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
BTaggingSelectionTool::m_maxEta
double m_maxEta
Definition: BTaggingSelectionTool.h:79
BTaggingSelectionTool::m_useCTag
bool m_useCTag
Definition: BTaggingSelectionTool.h:75
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
BTaggingSelectionTool::split
std::vector< std::string > split(const std::string &input, const char &delimiter)
Definition: BTaggingSelectionTool.cxx:810
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
BTaggingSelectionTool::taggerproperties::name
std::string name
Definition: BTaggingSelectionTool.h:94
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
BTaggingSelectionTool::getTaggerWeight
virtual CP::CorrectionCode getTaggerWeight(const xAOD::Jet &jet, double &tagweight) const override
Definition: BTaggingSelectionTool.cxx:298
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
BTaggingSelectionTool::taggerproperties::fraction_tau_cTag
double fraction_tau_cTag
Definition: BTaggingSelectionTool.h:98
xAOD::BTagging_v1::pc
bool pc(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:367
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
BTaggingSelectionTool::m_tagger
taggerproperties m_tagger
Definition: BTaggingSelectionTool.h:112
BTaggingSelectionTool::taggerproperties::get2DCutValue
double get2DCutValue(int row, int column) const
Definition: BTaggingSelectionTool.h:104
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
BTaggingSelectionTool::m_taggerName
std::string m_taggerName
Definition: BTaggingSelectionTool.h:84
python.xAODType.dummy
dummy
Definition: xAODType.py:4
BTaggingSelectionTool::m_ContinuousBenchmarks
std::string m_ContinuousBenchmarks
Definition: BTaggingSelectionTool.h:87
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
PlotSFuncertainty.wp
wp
Definition: PlotSFuncertainty.py:112
xAOD::BTagging_v1
Definition: BTagging_v1.h:39
BTaggingSelectionTool::m_CutFileName
std::string m_CutFileName
Definition: BTaggingSelectionTool.h:83
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
xAOD::BTagging_v1::pu
bool pu(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:353
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
BTaggingSelectionTool::ExtractTaggerProperties
StatusCode ExtractTaggerProperties(taggerproperties &tagger, const std::string &taggerName, const std::string &OP)
Definition: BTaggingSelectionTool.cxx:224
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
BTaggingSelectionTool::GN2
@ GN2
Definition: BTaggingSelectionTool.h:114
BTaggingSelectionTool::taggerproperties::fraction_c
double fraction_c
Definition: BTaggingSelectionTool.h:96
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
xAOD::BTaggingUtilities::getBTagging
const BTagging * getBTagging(const SG::AuxElement &part)
Access the default xAOD::BTagging object associated to an object.
Definition: BTaggingUtilities.cxx:37
BTaggingSelectionTool::GN1
@ GN1
Definition: BTaggingSelectionTool.h:114
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
BTaggingSelectionTool::SetTaggerEnum
Tagger SetTaggerEnum(const std::string &taggerName)
Definition: BTaggingSelectionTool.h:117
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
a
TList * a
Definition: liststreamerinfos.cxx:10
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:134
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
BTaggingSelectionTool::getQuantile
virtual int getQuantile(const xAOD::IParticle *) const override
Decide in which quantile of the tag weight distribution the jet belongs (continuous tagging) The retu...
Definition: BTaggingSelectionTool.cxx:627
BTaggingSelectionTool::taggerproperties::spline
TSpline3 * spline
Definition: BTaggingSelectionTool.h:99
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
BTaggingSelectionTool::taggerproperties::cuts2D
TMatrixD * cuts2D
Definition: BTaggingSelectionTool.h:101
BTaggingSelectionTool::taggerproperties::constcut
TVector * constcut
Definition: BTaggingSelectionTool.h:100
BTaggingSelectionTool::m_inf
TFile * m_inf
Definition: BTaggingSelectionTool.h:90
BTaggingSelectionTool::getCutValue
virtual CP::CorrectionCode getCutValue(double, double &cutval) const override
Definition: BTaggingSelectionTool.cxx:779
asg::AcceptData
Definition: AcceptData.h:30
BTaggingSelectionTool::checkRange
virtual bool checkRange(double, double, asg::AcceptData &) const
Helper function that decides whether a jet belongs to the correct jet selection for b-tagging.
Definition: BTaggingSelectionTool.cxx:761
SG::DataProxy
Definition: DataProxy.h:44
BTaggingSelectionTool::m_OP
std::string m_OP
Definition: BTaggingSelectionTool.h:85
BTaggingSelectionTool::DL1
@ DL1
Definition: BTaggingSelectionTool.h:114
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
BTaggingSelectionTool::taggerproperties::fraction_tau
double fraction_tau
Definition: BTaggingSelectionTool.h:97
fitman.k
k
Definition: fitman.py:528
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53
xAOD::BTagging_v1::MVx_discriminant
bool MVx_discriminant(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:381
xAOD::BTagging_v1::pb
bool pb(const std::string &taggername, double &value) const
Definition: BTagging_v1.cxx:360