ATLAS Offline Software
Loading...
Searching...
No Matches
Tool_FeatureExtractor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PANTAUALGS_TOOL_FEATUREEXTRACTOR_H
6#define PANTAUALGS_TOOL_FEATUREEXTRACTOR_H
7
8#include <string>
9#include <map>
10#include <vector>
11
13#include "AsgTools/AsgTool.h"
14#include "AsgTools/ToolHandle.h"
16
17// PanTau
23
24namespace PanTau {
25
32
34
35 public:
36
37 Tool_FeatureExtractor(const std::string &name);
38 virtual StatusCode initialize() override;
39
40 //get the features for an input seed
41 virtual StatusCode execute(PanTau::PanTauSeed* inSeed) const override;
42
43 protected:
44
45 //handle to the helper function
47 ToolHandle<PanTau::ITool_InformationStore> m_Tool_InformationStore{this, "Tool_InformationStore", "PanTau::Tool_InformationStore/Tool_InformationStore","Tool handle to the information store tool"};
48 Gaudi::Property<std::string> m_Tool_InformationStoreName{this, "Tool_InformationStoreName", "", "Tool handle to the information store tool"};
49
50 //Function to calculate basic features
51 StatusCode calculateBasicFeatures(PanTau::PanTauSeed* inSeed) const;
52
53 //Function to calculate features for one set of constituents
54 StatusCode calculateFeatures(PanTau::PanTauSeed* inSeed,
55 int tauConstituentType,
56 const std::map<std::string, double>& variants_SeedEt) const;
57
58 //Function to add the 4 momenta of the tau constituents to the features
59 StatusCode addConstituentMomenta(PanTau::PanTauSeed* inSeed) const;
60
61 //Function to calculate features based on two sets of constituents
62 StatusCode addCombinedFeatures(PanTau::PanTauSeed* inSeed) const;
63
64 //Function to fill the variants_SeedEt member
65 static void fillVariantsSeedEt(const std::vector<PanTau::TauConstituent*>& tauConstituents,
66 std::map<std::string, double>& variants_SeedEt) ;
67
68 //helper function to fill the variants_SeedEt map
69 static void addFeatureWrtSeedEnergy(PanTau::TauFeature* targetMap,
70 const std::string& featName,
71 double numerator,
72 const std::map<std::string, double>& denominatorMap) ;
73
75
76
78 std::vector<double> m_Config_BinEdges_Eta;
81
82 //make these configured via python! (super trick ;))
83 static const std::string varTypeName_Ratio() {return "Ratio";}
84 static const std::string varTypeName_Mean() {return "Mean";}
85 static const std::string varTypeName_StdDev() {return "StdDev";}
86 static const std::string varTypeName_HLV() {return "HLV";}
87 static const std::string varTypeName_DeltaR() {return "DeltaR";}
88 static const std::string varTypeName_JetMoment() {return "JetMoment";}
89 static const std::string varTypeName_Combined() {return "Combined";}
90 static const std::string varTypeName_Basic() {return "Basic";}
91 static const std::string varTypeName_PID() {return "PID";}
92 static const std::string varTypeName_Shots() {return "Shots";}
93
96 std::string m_varTypeName_HLV;
100 std::string m_varTypeName_PID;
101
102 bool m_init=false;
103
104 public:
105 inline bool isInitialized() override {return m_init;}
106};
107
108} // end of namespace PanTau
109#endif // PANTAUALGS_TOOL_FEATUREEXTRACTOR_H
#define ASG_TOOL_CLASS1
Interface for PID from tau seeds.
Class containing features of a tau seed.
Definition TauFeature.h:19
std::vector< double > m_Config_BinEdges_Eta
Helper members.
static const std::string varTypeName_Shots()
Gaudi::Property< std::string > m_Tool_InformationStoreName
static const std::string varTypeName_Ratio()
static const std::string varTypeName_PID()
Tool_FeatureExtractor(const std::string &name)
static const std::string varTypeName_DeltaR()
static const std::string varTypeName_Combined()
static const std::string varTypeName_Basic()
static const std::string varTypeName_HLV()
StatusCode addConstituentMomenta(PanTau::PanTauSeed *inSeed) const
ToolHandle< PanTau::ITool_InformationStore > m_Tool_InformationStore
StatusCode calculateFeatures(PanTau::PanTauSeed *inSeed, int tauConstituentType, const std::map< std::string, double > &variants_SeedEt) const
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_3prong
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_1prong
static const std::string varTypeName_Mean()
static void addFeatureWrtSeedEnergy(PanTau::TauFeature *targetMap, const std::string &featName, double numerator, const std::map< std::string, double > &denominatorMap)
static const std::string varTypeName_JetMoment()
StatusCode addCombinedFeatures(PanTau::PanTauSeed *inSeed) const
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
PanTau::HelperFunctions m_HelperFunctions
virtual StatusCode execute(PanTau::PanTauSeed *inSeed) const override
static const std::string varTypeName_StdDev()
StatusCode calculateBasicFeatures(PanTau::PanTauSeed *inSeed) const
static void fillVariantsSeedEt(const std::vector< PanTau::TauConstituent * > &tauConstituents, std::map< std::string, double > &variants_SeedEt)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47