Skip to content
Snippets Groups Projects
Commit 8fd80ee6 authored by BinBin Dong's avatar BinBin Dong Committed by Tadej Novak
Browse files

Return error for not setting ptau for GN2v01

Return error for not setting ptau for GN2v01
parent db32f06c
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,8 @@ class IBTaggingSelectionTool : virtual public asg::IAsgTool {
/// Get the decision using thet jet's pt and weight values (number of weight values depends on which tagger is used)
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* tag_weight */ ) const = 0;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta*/ , double /* taggerWeight_b */, double /* taggerWeight_c */) const = 0;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */ , double /* dl1pu */, double /* dl1ptau */ = 0.) const = 0;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */ , double /* dl1pu */) const = 0;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */ , double /* dl1pu */, double /* dl1ptau */) const = 0;
/// Decide in which quantile of the tagger weight distribution the jet belongs
/// The return value represents the bin index of the quantile distribution
......@@ -41,7 +42,8 @@ class IBTaggingSelectionTool : virtual public asg::IAsgTool {
virtual CP::CorrectionCode getCutValue(double /* jet pt */, double & cutval) const = 0;
virtual CP::CorrectionCode getTaggerWeight( const xAOD::Jet& jet, double & tagweight) const = 0;
virtual CP::CorrectionCode getTaggerWeight( double pb, double pc, double pu, double & tagweight, double ptau = 0.) const = 0;
virtual CP::CorrectionCode getTaggerWeight( double pb, double pc, double pu, double & tagweight) const = 0;
virtual CP::CorrectionCode getTaggerWeight( double pb, double pc, double pu, double & tagweight, double ptau) const = 0;
//flexibility for Continuous2D
virtual CP::CorrectionCode getTaggerWeight( const xAOD::Jet& jet, double & weight ,bool getCTagW) const = 0;
......
......@@ -315,6 +315,15 @@ CorrectionCode BTaggingSelectionTool::getTaggerWeight( const xAOD::Jet& jet, dou
}
CorrectionCode BTaggingSelectionTool::getTaggerWeight( double pb, double pc, double pu, double & tagweight) const{
if (m_tagger.name == "GN2v01"){
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)");
return CorrectionCode::Error;
} else {
return getTaggerWeight(pb, pc, pu, tagweight, m_useCTag, 0.);
}
}
CorrectionCode BTaggingSelectionTool::getTaggerWeight( double pb, double pc, double pu, double & tagweight, double ptau) const{
return getTaggerWeight(pb, pc, pu, tagweight, m_useCTag, ptau);
}
......@@ -511,6 +520,16 @@ asg::AcceptData BTaggingSelectionTool::accept(double pT, double eta, double tagg
return acceptData;
}
asg::AcceptData BTaggingSelectionTool::accept(double pT, double eta, double pb, double pc, double pu) const
{
if (m_tagger.name == "GN2v01"){
asg::AcceptData acceptData (&m_acceptinfo);
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)");
return acceptData;
} else {
return accept(pT, eta, pb, pc, pu, 0.);
}
}
asg::AcceptData BTaggingSelectionTool::accept(double pT, double eta, double pb, double pc, double pu, double ptau) const
{
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// BTaggingSelectionTool.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
/**
@class BTaggingSelectionTool
Tool to apply flavour-tagging requirements on jets
@author C. Lüdtke, M. Ughetto
@contact cluedtke@cern.ch, mughetto@cern.ch
Note for getTaggerWeight and getCutValue: the LAST defaulted argument
is now 'getCTagW', but before AB 21.2.221 it was 'useVetoWP', which has the
**opposite** meaning when set to true.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CPBTAGGINGSELECTIONTOOL_H
......@@ -55,7 +40,8 @@ class BTaggingSelectionTool: public asg::AsgTool,
/// Get the decision using thet jet's pt and tag weight values
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* tag_weight */ ) const override;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta*/ , double /* taggerWeight_b */, double /* taggerWeight_c */) const override;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */ , double /* dl1pu */, double /* dl1ptau */ = 0.) const override;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */, double /* dl1pu */) const override;
virtual asg::AcceptData accept(double /* jet pt */, double /* jet eta */, double /* dl1pb */, double /* dl1pc */, double /* dl1pu */, double /* dl1ptau */) 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
......@@ -67,7 +53,8 @@ class BTaggingSelectionTool: public asg::AsgTool,
virtual CP::CorrectionCode getCutValue(double /* jet pt */, double & cutval) const override;
//1D tagging wrapper
virtual CP::CorrectionCode getTaggerWeight( const xAOD::Jet& jet, double & tagweight) const override;
virtual CP::CorrectionCode getTaggerWeight( double pb, double pc, double pu, double & tagweight, double ptau = 0.) 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;
//flexibility for Continuous2D
virtual CP::CorrectionCode getTaggerWeight( const xAOD::Jet& jet, double & weight ,bool getCTagW) const override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment