 |
ATLAS Offline Software
|
#include <TauSelectionTool.h>
|
| | TauSelectionTool (const std::string &name) |
| | Constructor for standalone usage. More...
|
| |
| virtual | ~TauSelectionTool () |
| |
| virtual StatusCode | initialize () override |
| | Function initialising the tool. More...
|
| |
| virtual const asg::AcceptInfo & | getAcceptInfo () const override |
| | Get an object describing the "selection steps" of the tool. 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::TauJet &tau) const override |
| | Get the decision for a specific TauJet object. More...
|
| |
| virtual void | setOutFile (TFile *fOutFile) override |
| | Set output file for control histograms. More...
|
| |
| virtual void | writeControlHistograms () override |
| | Write control histograms to output file. More...
|
| |
| virtual void | print () const =0 |
| | Print the state of the tool. More...
|
| |
| virtual StatusCode | sysInitialize () |
| | Function initialising the tool in the correct way in Athena. 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 | 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 |
| |
|
| | ASG_TOOL_CLASS2 (TauSelectionTool, IAsgSelectionTool, TauAnalysisTools::ITauSelectionTool) friend class TauEfficiencyCorrectionsTool |
| | Create a proper constructor for Athena. More...
|
| |
| virtual StatusCode | beginEvent () override |
| | Function called when a new events is loaded. More...
|
| |
| template<typename T , typename U > |
| void | FillRegionVector (std::vector< T > &vRegion, U tMin, U tMax) const |
| |
| template<typename T , typename U > |
| void | FillValueVector (std::vector< T > &vRegion, U tVal) const |
| |
| template<typename T > |
| void | PrintConfigRegion (const std::string &sCutName, std::vector< T > &vRegion) const |
| |
| template<typename T > |
| void | PrintConfigValue (const std::string &sCutName, std::vector< T > &vRegion) const |
| |
| template<typename T > |
| void | PrintConfigValue (const std::string &sCutName, T &sVal) const |
| |
| void | setupCutFlowHistogram () |
| |
| int | convertStrToJetIDWP (const std::string &sJetIDWP) const |
| |
| int | convertStrToEleIDWP (const std::string &sEleIDWP) const |
| |
| std::string | convertJetIDWPToStr (int iJetIDWP) const |
| |
| std::string | convertEleIDWPToStr (int iEleIDWP) const |
| |
| 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...
|
| |
|
| std::vector< float > | m_vPtRegion |
| |
| std::vector< float > | m_vAbsEtaRegion |
| |
| std::vector< int > | m_vAbsCharges |
| |
| std::vector< unsigned > | m_vNTracks |
| |
| std::vector< float > | m_vJetRNNSigTransRegion |
| |
| std::vector< float > | m_vGNTauSigTransRegion |
| |
| std::string | m_sJetIDWP |
| |
| bool | m_useGNTau =false |
| |
| std::vector< float > | m_vEleRNNSigTransRegion |
| |
| std::string | m_sEleIDWP |
| |
| Gaudi::Property< int > | m_iSelectionCuts {this, "SelectionCuts", NoCut} |
| |
| Gaudi::Property< float > | m_dPtMin {this, "PtMin", NAN} |
| |
| Gaudi::Property< float > | m_dPtMax {this, "PtMax", NAN} |
| |
| Gaudi::Property< float > | m_dAbsEtaMin {this, "AbsEtaMin", NAN} |
| |
| Gaudi::Property< float > | m_dAbsEtaMax {this, "AbsEtaMax", NAN} |
| |
| Gaudi::Property< float > | m_iAbsCharge {this, "AbsCharge", NAN} |
| |
| Gaudi::Property< float > | m_dJetRNNSigTransMin {this, "JetRNNSigTransMin", NAN} |
| |
| Gaudi::Property< float > | m_dJetRNNSigTransMax {this, "JetRNNSigTransMax", NAN} |
| |
| Gaudi::Property< float > | m_dGNTauSigTransMin {this, "GNTauSigTransMin", NAN} |
| |
| Gaudi::Property< float > | m_dGNTauSigTransMax {this, "GNTauSigTransMax", NAN} |
| |
| Gaudi::Property< float > | m_iNTrack {this, "NTrack", NAN} |
| |
| Gaudi::Property< float > | m_dEleRNNSigTransMin {this, "EleRNNSigTransMin", NAN} |
| |
| Gaudi::Property< float > | m_dEleRNNSigTransMax {this, "EleRNNSigTransMax", NAN} |
| |
| Gaudi::Property< int > | m_iJetIDWP {this, "JetIDWP", 0} |
| |
| Gaudi::Property< int > | m_iEleIDWP {this, "EleIDWP", 0} |
| |
| Gaudi::Property< int > | m_iEleIDVersion {this, "EleIDVersion", 1} |
| |
| Gaudi::Property< bool > | m_bMuonOLR {this, "MuonOLR", false} |
| |
| Gaudi::Property< std::vector< float > > | m_vecPtRegion {this, "PtRegion", {}} |
| |
| Gaudi::Property< std::vector< float > > | m_vecAbsEtaRegion {this, "AbsEtaRegion",{}} |
| |
| Gaudi::Property< std::vector< int > > | m_vecAbsCharges {this, "AbsCharges", {}} |
| |
| Gaudi::Property< std::vector< unsigned > > | m_vecNTracks {this, "NTracks", {}} |
| |
| Gaudi::Property< std::vector< float > > | m_vecJetRNNSigTransRegion {this, "JetRNNSigTransRegion", {}} |
| |
| Gaudi::Property< std::vector< float > > | m_vecGNTauSigTransRegion {this, "GNTauSigTransRegion", {}} |
| |
| Gaudi::Property< std::vector< float > > | m_vecEleRNNSigTransRegion {this, "EleRNNSigTransRegion", {}} |
| |
| Gaudi::Property< std::string > | m_sConfigPath {this, "ConfigPath", "TauAnalysisTools/"+std::string(sSharedFilesVersion)+"/Selection/recommended_selection_r22.conf"} |
| |
| SG::ReadHandleKey< xAOD::MuonContainer > | m_muonContainerKey {this, "MuonContainerName", "Muons", "Muon container name"} |
| |
| SG::ReadHandleKey< xAOD::TauJetContainer > | m_tauContainerKey {this, "TauContainerName", "TauJets", "Tau container name"} |
| |
| SG::ReadDecorHandleKey< xAOD::TauJetContainer > | m_eVetoDecorKey {this, "eVetoDecorName", "", "Name of eVeto decoration"} |
| |
| SG::ReadDecorHandleKey< xAOD::TauJetContainer > | m_GNTauDecorKey {this, "GNTauDecorName", "", "Name of GnTauID decoration"} |
| |
| std::map< SelectionCuts, std::unique_ptr< TauAnalysisTools::TauSelectionCut > > | m_cMap |
| |
| MetaStore_t | m_inputMetaStore |
| | Object accessing the input metadata store. More...
|
| |
| MetaStore_t | m_outputMetaStore |
| | Object accessing the output metadata store. More...
|
| |
| bool | m_beginInputFileCalled |
| | Flag helping to discover when the tool misses the opening of the first input file. More...
|
| |
| bool | m_useIncidents |
| |
| 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 |
| |
Definition at line 52 of file TauSelectionTool.h.
◆ MetaStore_t
◆ MetaStorePtr_t
Type of the metadata store pointer in standalone mode.
Definition at line 68 of file AsgMetadataTool.h.
◆ StoreGateSvc_t
◆ TauSelectionTool()
| TauSelectionTool::TauSelectionTool |
( |
const std::string & |
name | ) |
|
◆ ~TauSelectionTool()
| TauSelectionTool::~TauSelectionTool |
( |
| ) |
|
|
virtual |
◆ accept() [1/2]
◆ accept() [2/2]
Get the decision for a specific TauJet object.
Implements TauAnalysisTools::ITauSelectionTool.
Definition at line 400 of file TauSelectionTool.cxx.
412 entry.second->fillHistogramCutPre(xTau);
420 if (!
entry.second->accept(xTau, acceptData))
434 catch (
const std::runtime_error&
error)
441 static std::atomic<uint64_t> warning_count (0
u);
442 auto mycount = ++ warning_count;
455 entry.second->fillHistogramCut(xTau);
◆ ASG_TOOL_CLASS2()
Create a proper constructor for Athena.
◆ beginEvent()
| StatusCode TauSelectionTool::beginEvent |
( |
| ) |
|
|
overrideprivatevirtual |
Function called when a new events is loaded.
Dummy implementation that can be overridden by the derived tool.
Reimplemented from asg::AsgMetadataTool.
Definition at line 366 of file TauSelectionTool.cxx.
368 return StatusCode::SUCCESS;
◆ beginInputFile()
| StatusCode asg::AsgMetadataTool::beginInputFile |
( |
| ) |
|
|
protectedvirtualinherited |
Function called when a new input file is opened.
Dummy implementation that can be overridden by the derived tool.
Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.
Definition at line 185 of file AsgMetadataTool.cxx.
188 return StatusCode::SUCCESS;
◆ convertEleIDWPToStr()
| std::string TauSelectionTool::convertEleIDWPToStr |
( |
int |
iEleIDWP | ) |
const |
|
private |
Definition at line 625 of file TauSelectionTool.cxx.
634 return "ELEIDRNNLOOSE";
636 return "ELEIDRNNMEDIUM";
638 return "ELEIDRNNTIGHT";
640 ATH_MSG_WARNING(
"EleID working point with enum " << iEleIDWP <<
" is unknown, the EleIDWP cut will not accept any tau!" );
◆ convertJetIDWPToStr()
| std::string TauSelectionTool::convertJetIDWPToStr |
( |
int |
iJetIDWP | ) |
const |
|
private |
Definition at line 593 of file TauSelectionTool.cxx.
602 return "JETIDRNNVERYLOOSE";
604 return "JETIDRNNLOOSE";
606 return "JETIDRNNMEDIUM";
608 return "JETIDRNNTIGHT";
610 return "JETIDGNTAUVERYLOOSE";
612 return "JETIDGNTAULOOSE";
614 return "JETIDGNTAUMEDIUM";
616 return "JETIDGNTAUTIGHT";
619 ATH_MSG_WARNING(
"JetID working point with enum " << iJetIDWP <<
" is unknown, the JetIDWP cut will not accept any tau!" );
◆ convertStrToEleIDWP()
| int TauSelectionTool::convertStrToEleIDWP |
( |
const std::string & |
sEleIDWP | ) |
const |
|
private |
◆ convertStrToJetIDWP()
| int TauSelectionTool::convertStrToJetIDWP |
( |
const std::string & |
sJetIDWP | ) |
const |
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| hndl | Object holding the property value. |
| doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
| name | Name of the property. |
| property | Object holding the property value. |
| doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ endInputFile()
| StatusCode asg::AsgMetadataTool::endInputFile |
( |
| ) |
|
|
protectedvirtualinherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ FillRegionVector()
template<typename T , typename U >
| void TauSelectionTool::FillRegionVector |
( |
std::vector< T > & |
vRegion, |
|
|
U |
tMin, |
|
|
U |
tMax |
|
) |
| const |
|
private |
Definition at line 512 of file TauSelectionTool.cxx.
514 if (!vRegion.empty())
517 vRegion.push_back(tMin);
519 vRegion.push_back(-std::numeric_limits<T>::infinity());
522 vRegion.push_back(tMax);
524 vRegion.push_back(std::numeric_limits<T>::infinity());
◆ FillValueVector()
template<typename T , typename U >
| void TauSelectionTool::FillValueVector |
( |
std::vector< T > & |
vRegion, |
|
|
U |
tVal |
|
) |
| const |
|
private |
◆ getAcceptInfo()
◆ getKey()
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
-
| ptr | The 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.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ 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
-
| ptr | The 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.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
| const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ handle()
| void asg::AsgMetadataTool::handle |
( |
const Incident & |
inc | ) |
|
|
protectedvirtualinherited |
Function receiving incidents from IncidentSvc/TEvent.
Reimplemented in Trig::TrigDecisionTool.
Definition at line 135 of file AsgMetadataTool.cxx.
141 if( inc.type() == IncidentType::BeginInputFile ) {
145 throw std::runtime_error(
"Couldn't call beginInputFile()" );
147 }
else if( inc.type() == IncidentType::EndInputFile ) {
150 throw std::runtime_error(
"Couldn't call endInputFile()" );
152 }
else if( inc.type() == IncidentType::BeginEvent ) {
160 throw std::runtime_error(
"Couldn't call beginInputFile()" );
165 throw std::runtime_error(
"Couldn't call beginEvent()" );
168 #ifdef XAOD_STANDALONE
169 }
else if( inc.type() == IncidentType::MetaDataStop ) {
172 throw std::runtime_error(
"Couldn't call metaDataStop()" );
175 #endif // XAOD_STANDALONE
177 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
◆ initialize()
| StatusCode TauSelectionTool::initialize |
( |
| ) |
|
|
overridevirtual |
Function initialising the tool.
Implements TauAnalysisTools::ITauSelectionTool.
Definition at line 35 of file TauSelectionTool.cxx.
47 bool bConfigViaProperties =
false;
48 if (!bConfigViaProperties and !
m_vPtRegion.empty()) bConfigViaProperties =
true;
49 if (!bConfigViaProperties and !std::isnan(
m_dPtMin.value())) bConfigViaProperties =
true;
50 if (!bConfigViaProperties and !std::isnan(
m_dPtMax.value())) bConfigViaProperties =
true;
51 if (!bConfigViaProperties and !
m_vAbsEtaRegion.empty()) bConfigViaProperties =
true;
52 if (!bConfigViaProperties and !std::isnan(
m_dAbsEtaMin.value())) bConfigViaProperties =
true;
53 if (!bConfigViaProperties and !std::isnan(
m_dAbsEtaMax.value())) bConfigViaProperties =
true;
54 if (!bConfigViaProperties and !
m_vAbsCharges.empty()) bConfigViaProperties =
true;
55 if (!bConfigViaProperties and !std::isnan(
m_iAbsCharge.value())) bConfigViaProperties =
true;
56 if (!bConfigViaProperties and !
m_vNTracks.empty()) bConfigViaProperties =
true;
57 if (!bConfigViaProperties and !std::isnan(
m_iNTrack.value())) bConfigViaProperties =
true;
59 if (!bConfigViaProperties and !std::isnan(
m_dJetRNNSigTransMin.value())) bConfigViaProperties =
true;
60 if (!bConfigViaProperties and !std::isnan(
m_dJetRNNSigTransMax.value())) bConfigViaProperties =
true;
62 if (!bConfigViaProperties and !std::isnan(
m_dGNTauSigTransMin.value())) bConfigViaProperties =
true;
63 if (!bConfigViaProperties and !std::isnan(
m_dGNTauSigTransMax.value())) bConfigViaProperties =
true;
64 if (!bConfigViaProperties and
m_iJetIDWP != 0) bConfigViaProperties =
true;
66 if (!bConfigViaProperties and !std::isnan(
m_dEleRNNSigTransMin.value())) bConfigViaProperties =
true;
67 if (!bConfigViaProperties and !std::isnan(
m_dEleRNNSigTransMax.value())) bConfigViaProperties =
true;
68 if (!bConfigViaProperties and
m_iEleIDWP != 0) bConfigViaProperties =
true;
69 if (!bConfigViaProperties and
m_bMuonOLR) bConfigViaProperties =
true;
71 if (bConfigViaConfigFile and bConfigViaProperties)
73 ATH_MSG_WARNING(
"Configured tool via setProperty and configuration file, which may lead to unexpected configuration.");
74 ATH_MSG_WARNING(
"In doubt check the configuration that is printed when the tool is initialized and the message level is set to debug");
75 ATH_MSG_WARNING(
"For further details please refer to the documentation:");
76 ATH_MSG_WARNING(
"https://gitlab.cern.ch/atlas/athena/blob/main/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst");
78 if (!bConfigViaConfigFile and !bConfigViaProperties)
80 ATH_MSG_WARNING(
"No cut configuration provided, the tool will not do anything. For further details please refer to the documentation:");
81 ATH_MSG_WARNING(
"https://gitlab.cern.ch/atlas/athena/blob/main/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst");
82 return StatusCode::SUCCESS;
85 if (bConfigViaConfigFile)
91 ATH_MSG_WARNING(
"Config file for TauSelectionTool with path "<<sInputFilePath<<
" does not contain an empty last line. The tool might not be properly configured!");
93 rEnv.ReadFile(sInputFilePath.c_str(),
96 std::vector<std::string> vCuts;
99 if (rEnv.Defined(
"SelectionCuts"))
103 auto lList = rEnv.GetTable();
104 for( Int_t
i = 0;
i < lList->GetEntries(); ++
i )
106 vCuts.push_back( lList->At(
i )->GetName() );
110 int iSelectionCuts = 0;
112 for (
const std::string& sCut : vCuts)
114 if (sCut ==
"PtRegion")
116 iSelectionCuts = iSelectionCuts |
CutPt;
120 else if (sCut ==
"PtMin")
122 iSelectionCuts = iSelectionCuts |
CutPt;
124 m_dPtMin = rEnv.GetValue(
"PtMin",NAN);
126 else if (sCut ==
"PtMax")
128 iSelectionCuts = iSelectionCuts |
CutPt;
130 m_dPtMax = rEnv.GetValue(
"PtMax",NAN);
132 else if (sCut ==
"AbsEtaRegion")
134 iSelectionCuts = iSelectionCuts |
CutAbsEta;
138 else if (sCut ==
"AbsEtaMin")
140 iSelectionCuts = iSelectionCuts |
CutAbsEta;
144 else if (sCut ==
"AbsEtaMax")
146 iSelectionCuts = iSelectionCuts |
CutAbsEta;
150 else if (sCut ==
"AbsCharges")
156 else if (sCut ==
"AbsCharge")
162 else if (sCut ==
"NTracks")
164 iSelectionCuts = iSelectionCuts |
CutNTrack;
168 else if (sCut ==
"NTrack")
170 iSelectionCuts = iSelectionCuts |
CutNTrack;
174 else if (sCut ==
"JetRNNSigTransRegion")
180 else if (sCut ==
"JetRNNSigTransMin")
186 else if (sCut ==
"JetRNNSigTransMax")
192 else if (sCut ==
"GNTauSigTransRegion")
201 else if (sCut ==
"GNTauSigTransMin")
210 else if (sCut ==
"GNTauSigTransMax")
219 else if (sCut ==
"EleRNNSigTransRegion")
225 else if (sCut ==
"EleRNNSigTransMin")
231 else if (sCut ==
"EleRNNSigTransMax")
237 else if (sCut ==
"JetIDWP")
245 for (
const std::string& checkCut : vCuts){
246 if (checkCut.find(
"SigTrans") != std::string::npos) {
247 ATH_MSG_ERROR(
"Misconfig due to JetIDWP and SigTrans cuts both present in the config file. Please CHECK carefully config file again");
248 return StatusCode::FAILURE;
252 else if (sCut ==
"EleIDWP")
258 else if (sCut ==
"MuonOLR")
275 if(
m_sJetIDWP.find(
"GNTAU") != std::string::npos)
296 using map_type = std::map<SelectionCuts, std::unique_ptr<TauAnalysisTools::TauSelectionCut>>;
297 using pair_type = map_type::value_type;
299 pair_type elements[] =
301 {
CutPt, std::make_unique<TauAnalysisTools::TauSelectionCutPt>(
this)},
302 {
CutAbsEta, std::make_unique<TauAnalysisTools::TauSelectionCutAbsEta>(
this)},
303 {
CutAbsCharge, std::make_unique<TauAnalysisTools::TauSelectionCutAbsCharge>(
this)},
304 {
CutNTrack, std::make_unique<TauAnalysisTools::TauSelectionCutNTracks>(
this)},
306 {
CutGNTauScoreSigTrans, std::make_unique<TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans>(
this)},
307 {
CutJetIDWP, std::make_unique<TauAnalysisTools::TauSelectionCutJetIDWP>(
this)},
309 {
CutEleIDWP, std::make_unique<TauAnalysisTools::TauSelectionCutEleIDWP>(
this)},
310 {
CutMuonOLR, std::make_unique<TauAnalysisTools::TauSelectionCutMuonOLR>(
this)}
313 m_cMap = { std::make_move_iterator(
begin(elements) ), std::make_move_iterator(
end(elements) ) };
338 std::string sCuts =
"";
361 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ inputMetaStore()
| AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore |
( |
| ) |
const |
|
inherited |
Accessor for the input metadata store.
Definition at line 93 of file AsgMetadataTool.cxx.
95 #ifdef XAOD_STANDALONE
97 #else // XAOD_STANDALONE
99 #endif // XAOD_STANDALONE
◆ metaDataStop()
| StatusCode asg::AsgMetadataTool::metaDataStop |
( |
| ) |
|
|
protectedvirtualinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ msgLvl()
◆ outputHandles()
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.
◆ outputMetaStore()
| AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore |
( |
| ) |
const |
|
inherited |
Accessor for the output metadata store.
Definition at line 102 of file AsgMetadataTool.cxx.
104 #ifdef XAOD_STANDALONE
106 #else // XAOD_STANDALONE
108 #endif // XAOD_STANDALONE
◆ print() [1/2]
| void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, LundVariablesTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
| virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, LundVariablesTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ PrintConfigRegion()
template<typename T >
| void TauSelectionTool::PrintConfigRegion |
( |
const std::string & |
sCutName, |
|
|
std::vector< T > & |
vRegion |
|
) |
| const |
|
private |
Definition at line 539 of file TauSelectionTool.cxx.
541 unsigned int iNumRegion = vRegion.size()/2;
542 for(
unsigned int iRegion = 0; iRegion < iNumRegion; iRegion++ )
544 ATH_MSG_DEBUG( sCutName<<
": " << vRegion.at(iRegion*2) <<
" to " << vRegion.at(iRegion*2+1) );
◆ PrintConfigValue() [1/2]
template<typename T >
| void TauSelectionTool::PrintConfigValue |
( |
const std::string & |
sCutName, |
|
|
std::vector< T > & |
vRegion |
|
) |
| const |
|
private |
◆ PrintConfigValue() [2/2]
template<typename T >
| void TauSelectionTool::PrintConfigValue |
( |
const std::string & |
sCutName, |
|
|
T & |
sVal |
|
) |
| const |
|
private |
◆ renounce()
◆ renounceArray()
◆ setOutFile()
| void TauSelectionTool::setOutFile |
( |
TFile * |
fOutFile | ) |
|
|
overridevirtual |
◆ setupCutFlowHistogram()
| void TauSelectionTool::setupCutFlowHistogram |
( |
| ) |
|
|
private |
◆ setUseIncidents()
| void asg::AsgMetadataTool::setUseIncidents |
( |
const bool |
flag | ) |
|
|
inlineprotectedinherited |
◆ sysInitialize()
| StatusCode asg::AsgMetadataTool::sysInitialize |
( |
| ) |
|
|
virtualinherited |
Function initialising the tool in the correct way in Athena.
This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.
Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.
Definition at line 115 of file AsgMetadataTool.cxx.
117 #ifndef XAOD_STANDALONE
124 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
129 #endif // not XAOD_STANDALONE
132 return StatusCode::SUCCESS;
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ writeControlHistograms()
| void TauSelectionTool::writeControlHistograms |
( |
| ) |
|
|
overridevirtual |
◆ TauSelectionCut
need to define cut classes to be friends to access protected variables, needed for access of cut thresholds
Definition at line 58 of file TauSelectionTool.h.
◆ TauSelectionCutAbsCharge
◆ TauSelectionCutAbsEta
◆ TauSelectionCutEleIDWP
◆ TauSelectionCutGNTauScoreSigTrans
◆ TauSelectionCutJetIDWP
◆ TauSelectionCutMuonOLR
◆ TauSelectionCutNTracks
◆ TauSelectionCutPt
◆ TauSelectionCutRNNEleScoreSigTrans
◆ TauSelectionCutRNNJetScoreSigTrans
◆ m_aAccept
◆ m_bCreateControlPlots
| Gaudi::Property<bool> TauAnalysisTools::TauSelectionTool::m_bCreateControlPlots {this, "CreateControlPlots", false} |
|
protected |
◆ m_beginInputFileCalled
| bool asg::AsgMetadataTool::m_beginInputFileCalled |
|
privateinherited |
Flag helping to discover when the tool misses the opening of the first input file.
Definition at line 126 of file AsgMetadataTool.h.
◆ m_bMuonOLR
| Gaudi::Property<bool> TauAnalysisTools::TauSelectionTool::m_bMuonOLR {this, "MuonOLR", false} |
|
private |
◆ m_cMap
◆ m_dAbsEtaMax
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dAbsEtaMax {this, "AbsEtaMax", NAN} |
|
private |
◆ m_dAbsEtaMin
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dAbsEtaMin {this, "AbsEtaMin", NAN} |
|
private |
◆ m_dEleRNNSigTransMax
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dEleRNNSigTransMax {this, "EleRNNSigTransMax", NAN} |
|
private |
◆ m_dEleRNNSigTransMin
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dEleRNNSigTransMin {this, "EleRNNSigTransMin", NAN} |
|
private |
◆ m_detStore
◆ m_dGNTauSigTransMax
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dGNTauSigTransMax {this, "GNTauSigTransMax", NAN} |
|
private |
◆ m_dGNTauSigTransMin
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dGNTauSigTransMin {this, "GNTauSigTransMin", NAN} |
|
private |
◆ m_dJetRNNSigTransMax
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dJetRNNSigTransMax {this, "JetRNNSigTransMax", NAN} |
|
private |
◆ m_dJetRNNSigTransMin
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dJetRNNSigTransMin {this, "JetRNNSigTransMin", NAN} |
|
private |
◆ m_dPtMax
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dPtMax {this, "PtMax", NAN} |
|
private |
◆ m_dPtMin
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_dPtMin {this, "PtMin", NAN} |
|
private |
◆ m_eVetoDecorKey
◆ m_evtStore
◆ m_fOutFile
| TFile* TauAnalysisTools::TauSelectionTool::m_fOutFile |
|
protected |
◆ m_GNTauDecorKey
◆ m_hCutFlow
| std::shared_ptr<TH1F> TauAnalysisTools::TauSelectionTool::m_hCutFlow |
|
protected |
◆ m_iAbsCharge
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_iAbsCharge {this, "AbsCharge", NAN} |
|
private |
◆ m_iEleIDVersion
| Gaudi::Property<int> TauAnalysisTools::TauSelectionTool::m_iEleIDVersion {this, "EleIDVersion", 1} |
|
private |
◆ m_iEleIDWP
| Gaudi::Property<int> TauAnalysisTools::TauSelectionTool::m_iEleIDWP {this, "EleIDWP", 0} |
|
private |
◆ m_iJetIDWP
| Gaudi::Property<int> TauAnalysisTools::TauSelectionTool::m_iJetIDWP {this, "JetIDWP", 0} |
|
private |
◆ m_inputMetaStore
◆ m_iNTrack
| Gaudi::Property<float> TauAnalysisTools::TauSelectionTool::m_iNTrack {this, "NTrack", NAN} |
|
private |
◆ m_iSelectionCuts
| Gaudi::Property<int> TauAnalysisTools::TauSelectionTool::m_iSelectionCuts {this, "SelectionCuts", NoCut} |
|
private |
◆ m_muonContainerKey
◆ m_outputMetaStore
◆ m_sConfigPath
| Gaudi::Property<std::string> TauAnalysisTools::TauSelectionTool::m_sConfigPath {this, "ConfigPath", "TauAnalysisTools/"+std::string(sSharedFilesVersion)+"/Selection/recommended_selection_r22.conf"} |
|
private |
◆ m_sEleIDWP
| std::string TauAnalysisTools::TauSelectionTool::m_sEleIDWP |
|
private |
◆ m_sJetIDWP
| std::string TauAnalysisTools::TauSelectionTool::m_sJetIDWP |
|
private |
◆ m_tauContainerKey
◆ m_useGNTau
| bool TauAnalysisTools::TauSelectionTool::m_useGNTau =false |
|
private |
◆ m_useIncidents
| bool asg::AsgMetadataTool::m_useIncidents |
|
privateinherited |
◆ m_vAbsCharges
| std::vector<int> TauAnalysisTools::TauSelectionTool::m_vAbsCharges |
|
private |
◆ m_vAbsEtaRegion
| std::vector<float> TauAnalysisTools::TauSelectionTool::m_vAbsEtaRegion |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vecAbsCharges
| Gaudi::Property<std::vector<int> > TauAnalysisTools::TauSelectionTool::m_vecAbsCharges {this, "AbsCharges", {}} |
|
private |
◆ m_vecAbsEtaRegion
| Gaudi::Property<std::vector<float> > TauAnalysisTools::TauSelectionTool::m_vecAbsEtaRegion {this, "AbsEtaRegion",{}} |
|
private |
◆ m_vecEleRNNSigTransRegion
| Gaudi::Property<std::vector<float> > TauAnalysisTools::TauSelectionTool::m_vecEleRNNSigTransRegion {this, "EleRNNSigTransRegion", {}} |
|
private |
◆ m_vecGNTauSigTransRegion
| Gaudi::Property<std::vector<float> > TauAnalysisTools::TauSelectionTool::m_vecGNTauSigTransRegion {this, "GNTauSigTransRegion", {}} |
|
private |
◆ m_vecJetRNNSigTransRegion
| Gaudi::Property<std::vector<float> > TauAnalysisTools::TauSelectionTool::m_vecJetRNNSigTransRegion {this, "JetRNNSigTransRegion", {}} |
|
private |
◆ m_vecNTracks
| Gaudi::Property<std::vector<unsigned> > TauAnalysisTools::TauSelectionTool::m_vecNTracks {this, "NTracks", {}} |
|
private |
◆ m_vecPtRegion
| Gaudi::Property<std::vector<float> > TauAnalysisTools::TauSelectionTool::m_vecPtRegion {this, "PtRegion", {}} |
|
private |
◆ m_vEleRNNSigTransRegion
| std::vector<float> TauAnalysisTools::TauSelectionTool::m_vEleRNNSigTransRegion |
|
private |
◆ m_vGNTauSigTransRegion
| std::vector<float> TauAnalysisTools::TauSelectionTool::m_vGNTauSigTransRegion |
|
private |
◆ m_vhka
◆ m_vJetRNNSigTransRegion
| std::vector<float> TauAnalysisTools::TauSelectionTool::m_vJetRNNSigTransRegion |
|
private |
◆ m_vNTracks
| std::vector<unsigned> TauAnalysisTools::TauSelectionTool::m_vNTracks |
|
private |
◆ m_vPtRegion
| std::vector<float> TauAnalysisTools::TauSelectionTool::m_vPtRegion |
|
private |
The documentation for this class was generated from the following files:
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
@ u
Enums for curvilinear frames.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Class describing a tau jet.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string to_string(const DetectorType &type)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ Tau
The object is a tau (jet)