Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
PanTau::Tool_FeatureExtractor Class Reference

#include <Tool_FeatureExtractor.h>

Inheritance diagram for PanTau::Tool_FeatureExtractor:
Collaboration diagram for PanTau::Tool_FeatureExtractor:

Public Member Functions

 Tool_FeatureExtractor (const std::string &name)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode execute (PanTau::PanTauSeed *inSeed) const override
 
bool isInitialized () override
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &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

StatusCode calculateBasicFeatures (PanTau::PanTauSeed *inSeed) const
 
StatusCode calculateFeatures (PanTau::PanTauSeed *inSeed, int tauConstituentType, const std::map< std::string, double > &variants_SeedEt) const
 
StatusCode addConstituentMomenta (PanTau::PanTauSeed *inSeed) const
 
StatusCode addCombinedFeatures (PanTau::PanTauSeed *inSeed, const std::map< std::string, double > &variants_SeedEt) const
 
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...
 

Static Protected Member Functions

static void fillVariantsSeedEt (const std::vector< PanTau::TauConstituent * > &tauConstituents, std::map< std::string, double > &variants_SeedEt)
 
static void addFeatureWrtSeedEnergy (PanTau::TauFeature *targetMap, const std::string &featName, double numerator, const std::map< std::string, double > &denominatorMap)
 
static const std::string varTypeName_Sum ()
 
static const std::string varTypeName_Ratio ()
 
static const std::string varTypeName_EtInRing ()
 
static const std::string varTypeName_Isolation ()
 
static const std::string varTypeName_Num ()
 
static const std::string varTypeName_Mean ()
 
static const std::string varTypeName_StdDev ()
 
static const std::string varTypeName_HLV ()
 
static const std::string varTypeName_Angle ()
 
static const std::string varTypeName_DeltaR ()
 
static const std::string varTypeName_JetMoment ()
 
static const std::string varTypeName_Combined ()
 
static const std::string varTypeName_JetShape ()
 
static const std::string varTypeName_ImpactParams ()
 
static const std::string varTypeName_Basic ()
 
static const std::string varTypeName_PID ()
 
static const std::string varTypeName_Shots ()
 

Protected Attributes

PanTau::HelperFunctions m_HelperFunctions
 
ToolHandle< PanTau::ITool_InformationStorem_Tool_InformationStore {this, "Tool_InformationStore", "PanTau::Tool_InformationStore/Tool_InformationStore","Tool handle to the information store tool"}
 
Gaudi::Property< std::string > m_Tool_InformationStoreName {this, "Tool_InformationStoreName", "", "Tool handle to the information store tool"}
 
int m_Config_UseEmptySeeds = 0
 
std::vector< double > m_Config_CellBased_BinEdges_Eta
 Helper members. More...
 
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_1prong
 
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_3prong
 
std::string m_varTypeName_Sum
 
std::string m_varTypeName_Ratio
 
std::string m_varTypeName_EtInRing
 
std::string m_varTypeName_Isolation
 
std::string m_varTypeName_Num
 
std::string m_varTypeName_Mean
 
std::string m_varTypeName_StdDev
 
std::string m_varTypeName_HLV
 
std::string m_varTypeName_Angle
 
std::string m_varTypeName_DeltaR
 
std::string m_varTypeName_JetMoment
 
std::string m_varTypeName_Combined
 
std::string m_varTypeName_JetShape
 
std::string m_varTypeName_ImpactParams
 
std::string m_varTypeName_Basic
 
std::string m_varTypeName_PID
 
bool m_init =false
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

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

Tool to extract jet features from tau seeds.

Author
Christian Limbach
Sebastian Fleischmann

Definition at line 31 of file Tool_FeatureExtractor.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ Tool_FeatureExtractor()

PanTau::Tool_FeatureExtractor::Tool_FeatureExtractor ( const std::string &  name)

Definition at line 34 of file Tool_FeatureExtractor.cxx.

34  :
36 {
37 }

Member Function Documentation

◆ addCombinedFeatures()

StatusCode PanTau::Tool_FeatureExtractor::addCombinedFeatures ( PanTau::PanTauSeed inSeed,
const std::map< std::string, double > &  variants_SeedEt 
) const
protected

Definition at line 533 of file Tool_FeatureExtractor.cxx.

534  {
535 
536  // Prepare some short notations for variables
537  PanTau::TauFeature* tauFeatures = inSeed->getFeatures();
538  std::string inputAlgName = inSeed->getNameInputAlgorithm();
539 
540  //et: EFO Type
541  int et_Charged = PanTau::TauConstituent::t_Charged;
542  int et_Pi0Neut = PanTau::TauConstituent::t_Pi0Neut;
543  int et_Neutral = PanTau::TauConstituent::t_Neutral;
544 
545  bool foundIt;
546  std::vector<PanTau::TauConstituent*> list_NeutralConstituents = inSeed->getConstituentsOfType(et_Neutral, foundIt);
547 
548  // Prepare the list of names for EFO Types &
549  // the 4 momenta of the different sub systems
550  // (ie. charged, neutral subsystem, etc...)
551  std::string name_EFOType[PanTau::TauConstituent::t_nTypes];
552  double num_EFOs[PanTau::TauConstituent::t_nTypes];
553  TLorentzVector tlv_System[PanTau::TauConstituent::t_nTypes];
554  TLorentzVector tlv_1stEFO[PanTau::TauConstituent::t_nTypes];
555  TLorentzVector tlv_2ndEFO[PanTau::TauConstituent::t_nTypes];
556 
557  // get input objects to calc combined features
558  bool tlv_Sys_OK[PanTau::TauConstituent::t_nTypes];
559  bool tlv_1st_OK[PanTau::TauConstituent::t_nTypes];
560 
561  //initialize arrays with default values
562  for(unsigned int iType=0; iType<(unsigned int)PanTau::TauConstituent::t_nTypes; iType++) {
563  name_EFOType[iType] = "";
564  num_EFOs[iType] = 0.;
565  tlv_System[iType] = TLorentzVector();
566  tlv_1stEFO[iType] = TLorentzVector();
567  tlv_2ndEFO[iType] = TLorentzVector();
568  tlv_Sys_OK[iType] = false;
569  tlv_1st_OK[iType] = false;
570  }
571 
572  for(int iType=0; iType<(int)PanTau::TauConstituent::t_nTypes; iType++) {
574 
575  tlv_System[iType] = inSeed->getSubsystemHLV(iType, tlv_Sys_OK[iType]);
576  if (!tlv_Sys_OK[iType]) continue;
577 
578  std::vector<TauConstituent*> typeConstituents = inSeed->getConstituentsOfType(iType, tlv_Sys_OK[iType]);
579  if (typeConstituents.empty()) tlv_Sys_OK[iType] = false;
580  if (!tlv_Sys_OK[iType]) continue;
581 
582  num_EFOs[iType] = typeConstituents.size();
583 
584  if (!typeConstituents.empty()) {
585  tlv_1stEFO[iType] = typeConstituents.at(0)->p4();
586  tlv_1st_OK[iType] = true;
587  } else {
588  tlv_1st_OK[iType] = false;
589  }
590 
591  if (typeConstituents.size() > 1) {
592  tlv_2ndEFO[iType] = typeConstituents.at(1)->p4();
593  }
594  }
595 
596  // From the extracted input, calc combined features
597  std::string prefixVARType = m_varTypeName_Combined;
598 
599  // Combined Type-vs-Type Features
600  // Loop over all EFO types...
601  // for every type, loop over all other types (but neglect permutations, i.e. A,B is the same as B,A)
602  // calculate ratios, angles etc...
603 
604  for(int iType=0; iType<PanTau::TauConstituent::t_nTypes; iType++) {
605 
606  if(iType == (int)PanTau::TauConstituent::t_NoType) continue;
607  int type_Denom = iType;
608 
609  for(int jType=0; jType<PanTau::TauConstituent::t_nTypes; jType++) {
610 
611  if(jType == (int)PanTau::TauConstituent::t_NoType) continue;
612  int type_Nom = jType;
613 
614  if(jType == iType) continue;
615 
616  std::string typeName_Nom = PanTau::TauConstituent::getTypeName((PanTau::TauConstituent::Type)type_Nom);
617  std::string typeName_Denom = PanTau::TauConstituent::getTypeName((PanTau::TauConstituent::Type)type_Denom);
618 
619  double sum_Et_Nom = 0.0;
620  double sum_Et_Denom = 0.0;
621  if(tlv_Sys_OK[type_Nom] && tlv_Sys_OK[type_Denom]) {
622  sum_Et_Nom = tlv_System[type_Nom].Et();
623  sum_Et_Denom = tlv_System[type_Denom].Et();
624  }
625 
626  // Fraction of leading EFO of system A wrt complete system B
627  // this is not symmetric wrt system A and B, hence do this for all combinations
628  if(tlv_1st_OK[type_Nom]) {
629  if(tlv_1stEFO[type_Nom].Et() > 0. && sum_Et_Denom > 0.) {
630  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_Log1st" + typeName_Nom + "EtOver" + typeName_Denom + "Et", std::log10(tlv_1stEFO[type_Nom].Et() / sum_Et_Denom) );
631  }
632  }
633 
634  //following features symmetric in system A-B, hence skip multi calculation
635  if(jType <= iType) continue;
636 
637  //Energy ratios between systems
638  if(sum_Et_Denom > 0. && sum_Et_Nom > 0.) {
639  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_Log" + typeName_Nom + "EtOver" + typeName_Denom + "Et", std::log10(sum_Et_Nom / sum_Et_Denom) );
640  }//end check for div by zero
641 
642  //Angles between systems
643  if(tlv_Sys_OK[type_Nom] && tlv_Sys_OK[type_Denom]) {
644  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_Angle" + typeName_Nom + "To" + typeName_Denom, tlv_System[type_Nom].Angle( tlv_System[type_Denom].Vect()) );
645  }//end check for valid system pointer
646 
647  if(tlv_1st_OK[type_Nom] && tlv_1st_OK[type_Denom]) {
648  //Delta R between 1st and 1st EFO
649  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_DeltaR1st" + typeName_Nom + "To1st" + typeName_Denom, tlv_1stEFO[type_Nom].DeltaR( tlv_1stEFO[type_Denom] ) );
650 
651  //Angles between 1st and 1st EFO
652  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_Angle1st" + typeName_Nom + "To1st" + typeName_Denom, tlv_1stEFO[type_Nom].Angle( tlv_1stEFO[type_Denom].Vect() ) );
653  } //end check for valid leading efo
654 
655  }//end loop over system B
656  }//end loop over system A
657 
658 
659  // Combined Selected-Type Features
660 
661  //setup arrays for combination of selected charged and neutral combinations
662  const int cTypes = 1;
663  const int nTypes = 2;
664  int index_charged[cTypes] = {et_Charged};
665  int index_neutral[nTypes] = {et_Pi0Neut, et_Neutral};
666 
667  for(int cType=0; cType<cTypes; cType++) {
668  for(int nType=0; nType<nTypes; nType++) {
669 
670  int et_c = index_charged[cType];
671  int et_n = index_neutral[nType];
672 
675 
676  if(!tlv_Sys_OK[et_c] || !tlv_Sys_OK[et_n]) continue;
677 
678  //mean Et fraction of charged+neutral system wrt total ET
679  if(num_EFOs[et_c] + num_EFOs[et_n] > 0.) {
680  double mean_cTypenTypeEt = ( tlv_System[et_c].Et() + tlv_System[et_n].Et() ) / (num_EFOs[et_c] + num_EFOs[et_n]);
681  addFeatureWrtSeedEnergy(tauFeatures, inputAlgName + "_" + prefixVARType + "_Mean" + name_cType + name_nType + "Et_Wrt", mean_cTypenTypeEt, variants_SeedEt);
682  }
683 
684  //invariant masses
685  tauFeatures->addFeature(inputAlgName + "_" + prefixVARType + "_InvMass" + name_cType + name_nType, ( tlv_System[et_c] + tlv_System[et_n] ).M() );
686 
687  }//end loop neutral types
688  }//end loop charged types
689 
690  return StatusCode::SUCCESS;
691 }

◆ addConstituentMomenta()

StatusCode PanTau::Tool_FeatureExtractor::addConstituentMomenta ( PanTau::PanTauSeed inSeed) const
protected

Definition at line 212 of file Tool_FeatureExtractor.cxx.

212  {
213  std::string inputAlgName = inSeed->getNameInputAlgorithm();
214  TauFeature* tauFeatureMap = inSeed->getFeatures();
215  std::string prefixVARType = m_varTypeName_HLV;
216  for(int iType=0; iType<(int)PanTau::TauConstituent::t_nTypes; iType++) {
217  bool isOK;
218  std::vector<PanTau::TauConstituent*> list_TypeConstituents = inSeed->getConstituentsOfType(iType, isOK); // list of constituents of current type
219  unsigned int n_Constituents_Type = list_TypeConstituents.size(); // number of objects of current type
220  TLorentzVector tlv_TypeConstituents = inSeed->getSubsystemHLV(iType, isOK); // summed hlv of objects of current type
221  std::string curTypeName = PanTau::TauConstituent::getTypeName((PanTau::TauConstituent::Type)iType);
222  std::string name = inputAlgName + "_" + curTypeName + "_" + prefixVARType;
223 
224  std::vector<PanTau::TauConstituent*> list_TypeConstituents_SortBDT = inSeed->getConstituentsOfType(iType, isOK);
225  std::sort(list_TypeConstituents_SortBDT.begin(), list_TypeConstituents_SortBDT.end(), sortTauConstituentMVA);
226 
227  if(!list_TypeConstituents.empty()) {
228  tauFeatureMap->addFeature(name + "_SumPt", tlv_TypeConstituents.Perp());
229  tauFeatureMap->addFeature(name + "_SumEta", tlv_TypeConstituents.Eta());
230  tauFeatureMap->addFeature(name + "_SumPhi", tlv_TypeConstituents.Phi());
231  tauFeatureMap->addFeature(name + "_SumM", tlv_TypeConstituents.M());
232  }
233 
234  //store 4-vectors of current type (bdt sort)
235  std::vector<double> curConstsBDT_pt = std::vector<double>(0);
236  std::vector<double> curConstsBDT_eta = std::vector<double>(0);
237  std::vector<double> curConstsBDT_phi = std::vector<double>(0);
238  std::vector<double> curConstsBDT_m = std::vector<double>(0);
239  for(unsigned int iConst=0; iConst<n_Constituents_Type; iConst++) {
240  TLorentzVector tlv_curConstBDT = list_TypeConstituents_SortBDT[iConst]->p4();
241  curConstsBDT_pt.push_back(tlv_curConstBDT.Perp());
242  curConstsBDT_eta.push_back(tlv_curConstBDT.Eta());
243  curConstsBDT_phi.push_back(tlv_curConstBDT.Phi());
244  curConstsBDT_m.push_back(tlv_curConstBDT.M());
245  }
246  tauFeatureMap->addVecFeature(name + "_BDTSort_Constituents_pt", curConstsBDT_pt);
247  tauFeatureMap->addVecFeature(name + "_BDTSort_Constituents_eta", curConstsBDT_eta);
248  tauFeatureMap->addVecFeature(name + "_BDTSort_Constituents_phi", curConstsBDT_phi);
249  tauFeatureMap->addVecFeature(name + "_BDTSort_Constituents_m", curConstsBDT_m);
250 
251  } //end loop over constituent types
252 
253  return StatusCode::SUCCESS;
254 }

◆ addFeatureWrtSeedEnergy()

void PanTau::Tool_FeatureExtractor::addFeatureWrtSeedEnergy ( PanTau::TauFeature targetMap,
const std::string &  featName,
double  numerator,
const std::map< std::string, double > &  denominatorMap 
)
staticprotected

Definition at line 97 of file Tool_FeatureExtractor.cxx.

100  {
101  std::map<std::string, double>::const_iterator it = denominatorMap.begin();
102  for(; it!=denominatorMap.end(); ++it) {
103  std::string FullName = featName + it->first;
104  float value = (float)it->second;
105  if(value <= 0. || std::isnan(value) || std::isinf(value) ) continue;
106  targetMap->addFeature(FullName, numerator / it->second);
107  }
108 }

◆ calculateBasicFeatures()

StatusCode PanTau::Tool_FeatureExtractor::calculateBasicFeatures ( PanTau::PanTauSeed inSeed) const
protected

Loop over types to fill

  • multiplicity of that type
  • sum charge and abs charge

Fill multiplicity for any constituents

Fill the proto vector (i.e. sum momentum of constituents)

Definition at line 150 of file Tool_FeatureExtractor.cxx.

150  {
151 
152  PanTau::TauFeature* featureMap = inSeed->getFeatures();
153 
154  std::string featureAlg = inSeed->getNameInputAlgorithm();
155  std::string featurePrefix = m_varTypeName_Basic;
156  std::string name = featureAlg + "_" + featurePrefix;
157 
158  double SumCharge = 0;
159  double AbsCharge = 0;
160 
164  for(int iType=0; iType<PanTau::TauConstituent::t_nTypes; iType++) {
165 
166  bool foundIt = false;
167  std::vector<TauConstituent*> curList = inSeed->getConstituentsOfType(iType, foundIt);
168  if(!foundIt) continue;
169 
170  //store multiplicity of current type
172  unsigned int nConstituents = curList.size();
173  featureMap->addFeature(name + "_N" + typeName + "Consts", nConstituents);
174 
175  //count charge, i.e. skip if not charged
176  if(iType != (int)PanTau::TauConstituent::t_Charged) continue;
177  for(unsigned int iConst=0; iConst<nConstituents; iConst++) {
178  PanTau::TauConstituent* curConstituent = curList[iConst];
179  SumCharge += curConstituent->getCharge();
180  AbsCharge += std::abs((double)curConstituent->getCharge());
181  }
182  }
183 
184  //store charge
185  featureMap->addFeature(name + "_SumCharge", SumCharge);
186  featureMap->addFeature(name + "_AbsCharge", AbsCharge);
187 
189  //all constituents
190  std::string typeNameAll = PanTau::TauConstituent::AllConstituentsName();
191  featureMap->addFeature(name + "_N" + typeNameAll + "Consts", inSeed->getConstituentsAsList_Core().size() + inSeed->getConstituentsAsList_Wide().size());
192 
194  //proto 4-vector (just the sum of all constituents)
195  // will have better four momentum after mode ID
196  TLorentzVector tlv_ProtoMomentumCore = inSeed->getProtoMomentumCore();
197  featureMap->addFeature(name + "_ProtoMomentumCore_pt", tlv_ProtoMomentumCore.Perp());
198  featureMap->addFeature(name + "_ProtoMomentumCore_eta", tlv_ProtoMomentumCore.Eta());
199  featureMap->addFeature(name + "_ProtoMomentumCore_phi", tlv_ProtoMomentumCore.Phi());
200  featureMap->addFeature(name + "_ProtoMomentumCore_m", tlv_ProtoMomentumCore.M());
201 
202  TLorentzVector tlv_ProtoMomentumWide = inSeed->getProtoMomentumWide();
203  featureMap->addFeature(name + "_ProtoMomentumWide_pt", tlv_ProtoMomentumWide.Perp());
204  featureMap->addFeature(name + "_ProtoMomentumWide_eta", tlv_ProtoMomentumWide.Eta());
205  featureMap->addFeature(name + "_ProtoMomentumWide_phi", tlv_ProtoMomentumWide.Phi());
206  featureMap->addFeature(name + "_ProtoMomentumWide_m", tlv_ProtoMomentumWide.M());
207 
208  return StatusCode::SUCCESS;
209 }

◆ calculateFeatures()

StatusCode PanTau::Tool_FeatureExtractor::calculateFeatures ( PanTau::PanTauSeed inSeed,
int  tauConstituentType,
const std::map< std::string, double > &  variants_SeedEt 
) const
protected

//////////////////////////////////////////
Prepare variables for information from eflow Objects //////////////////////////////////////////

////////////////////////////////////////// Loop over selected constituents and collect information //////////////////////////////////////////

////////////////////////////////////////// Calculate & fill features //////////////////////////////////////////

Multiplicities ///////////////////////////////////////////

Substructure particle ID features ///////////////////////////////////////////

Shot information ///////////////////////////////////////////

Ratios ///////////////////////////////////////////

EtRings ///////////////////////////////////////////

Isolations ///////////////////////////////////////////

Standard deviations ///////////////////////////////////////////

JetMoment ///////////////////////////////////////////

Definition at line 257 of file Tool_FeatureExtractor.cxx.

259  {
260 
261  std::string curTypeName = PanTau::TauConstituent::getTypeName( (PanTau::TauConstituent::Type)tauConstituentType );
262  std::string curTypeName_All = PanTau::TauConstituent::AllConstituentsName();
263  PanTau::TauFeature* tauFeatureMap = inSeed->getFeatures();
264  std::string inputAlgName = inSeed->getNameInputAlgorithm();
265  TLorentzVector tlv_Reference = inSeed->getProtoMomentumCore();
266 
267  std::vector<PanTau::TauConstituent*> list_AllConstituents = inSeed->getConstituentsAsList_Core();
268 
269  bool foundIt = false;
270  std::vector<PanTau::TauConstituent*> list_TypeConstituents;
271  if (tauConstituentType != PanTau::TauConstituent::t_NoType) list_TypeConstituents = inSeed->getConstituentsOfType(tauConstituentType, foundIt);
272  if (tauConstituentType == PanTau::TauConstituent::t_NoType) list_TypeConstituents = list_AllConstituents;
273  if (!foundIt) return StatusCode::SUCCESS;
274 
275  unsigned int n_Constituents_Type = list_TypeConstituents.size();
276 
277  //sort the lists by Et
278  std::sort(list_AllConstituents.begin(), list_AllConstituents.end(), sortTauConstituentEt);
279  std::sort(list_TypeConstituents.begin(), list_TypeConstituents.end(), sortTauConstituentEt);
280 
281  TLorentzVector tlv_1st_Et;
282  TLorentzVector tlv_2nd_Et;
283  TLorentzVector tlv_3rd_Et;
284 
285  if(!list_TypeConstituents.empty()) tlv_1st_Et = list_TypeConstituents[0]->p4();
286  if(list_TypeConstituents.size() > 1) tlv_2nd_Et = list_TypeConstituents[1]->p4();
287  if(list_TypeConstituents.size() > 2) tlv_3rd_Et = list_TypeConstituents[2]->p4();
288 
289 
290  TLorentzVector tlv_Last_Et;
291  if(!list_TypeConstituents.empty()) tlv_Last_Et = list_TypeConstituents.back()->p4();
292 
293  //make an additional list of constituents, but now ordered by BDT value
294  std::vector<PanTau::TauConstituent*> list_TypeConstituents_SortBDT = list_TypeConstituents;
295  std::sort(list_TypeConstituents_SortBDT.begin(), list_TypeConstituents_SortBDT.end(), sortTauConstituentMVA);
296 
297  TLorentzVector tlv_1st_BDT;
298  TLorentzVector tlv_2nd_BDT;
299  TLorentzVector tlv_3rd_BDT;
300 
301  if(!list_TypeConstituents_SortBDT.empty()) tlv_1st_BDT = list_TypeConstituents_SortBDT[0]->p4();
302  if(list_TypeConstituents_SortBDT.size() > 1) tlv_2nd_BDT = list_TypeConstituents_SortBDT[1]->p4();
303  if(list_TypeConstituents_SortBDT.size() > 2) tlv_3rd_BDT = list_TypeConstituents_SortBDT[2]->p4();
304 
308 
309  // ===> hlv for the leading EFOs and the summed HLV
310  TLorentzVector tlv_TypeConstituents;
311  // ===> Sum of Et, Et^2, E and E^2
312  double sum_Et = 0;
313  double sum_Et2 = 0;
314  // ===> Sum of Et (and E) times DeltaR, DeltaR', Angle
315  double sum_EtxDR = 0;
316  // ===> Isolation rings
317  double sum_EtInRing00To01 = 0;
318  double sum_EtInRing01To02 = 0;
319  double sum_EtInRing02To03 = 0;
320  double sum_EtInRing03To04 = 0;
321  double sum_EtInRing04To05 = 0;
322  // ===> Multiplicities
323  unsigned int num_EFOs = 0;
324  // ===> Maximal values
325  double max_DeltaR = 0;
326 
327 
331  for(unsigned int iTypeConst=0; iTypeConst<list_TypeConstituents.size(); iTypeConst++) {
332 
333  //get hep lorentz vector
334  TLorentzVector tlv_curConst = list_TypeConstituents.at(iTypeConst)->p4();
335 
336  //final check (nan & inf)
337  if (std::isnan(tlv_curConst.Pt()) || std::isinf(tlv_curConst.Pt())) continue;
338 
339  //ready to calc stuff
340  //basically update each of the prepared sum_* and num_* variables above,
341  // the sum HLV and the pointers to 1st, 2nd, 3rd leading constituents of current type
342  tlv_TypeConstituents += tlv_curConst;
343 
344  //helpers to reduce function calls
345  double hlp_Et = tlv_curConst.Et();
346  double hlp_Et2 = hlp_Et * hlp_Et;
347  double hlp_DeltaR = tlv_Reference.DeltaR(tlv_curConst);
348 
349  // update Sum of Et, Et^2, E and E^2
350  sum_Et += hlp_Et;
351  sum_Et2 += hlp_Et2;
352  // update Sum of Et (and E) times DeltaR, DeltaR', Angle
353  sum_EtxDR += hlp_Et * hlp_DeltaR;
354  // update Isolation rings
355  if(hlp_DeltaR >= 0.0 && hlp_DeltaR < 0.1) sum_EtInRing00To01 += hlp_Et;
356  if(hlp_DeltaR >= 0.1 && hlp_DeltaR < 0.2) sum_EtInRing01To02 += hlp_Et;
357  if(hlp_DeltaR >= 0.2 && hlp_DeltaR < 0.3) sum_EtInRing02To03 += hlp_Et;
358  if(hlp_DeltaR >= 0.3 && hlp_DeltaR < 0.4) sum_EtInRing03To04 += hlp_Et;
359  if(hlp_DeltaR >= 0.4 && hlp_DeltaR < 0.5) sum_EtInRing04To05 += hlp_Et;
360  // update Multiplicities
361  num_EFOs++;
362  // update Max values
363  if(hlp_DeltaR > max_DeltaR) max_DeltaR = hlp_DeltaR;
364  }//end loop over selected EFOs
365 
366 
367 
371 
372  // naming string
373  std::string prefixVARType = "";
374 
376  //if there are no EFOs of this type in the seed, all other variables cannot be calculated to have any reasonable value
377  if( num_EFOs == 0 ) {
378  return StatusCode::SUCCESS;
379  }
380 
382  prefixVARType = m_varTypeName_PID;
383 
384  // Sorted by highest BDT score
385  for(unsigned int iTypeConst=0; iTypeConst<n_Constituents_Type; iTypeConst++) {
386 
387  double value_BDT = list_TypeConstituents_SortBDT[iTypeConst]->getBDTValue();
388  if( std::isnan(value_BDT) || std::isinf(value_BDT) ) continue;
389 
390  //correct BDT value based on BDT cut
391  if(tauConstituentType != PanTau::TauConstituent::t_Charged) {
392  double mvaCorrection = 0.0;
393  double etaCurConst = list_TypeConstituents_SortBDT[iTypeConst]->p4().Eta();
394  int etaBinIndex = m_HelperFunctions.getBinIndex(m_Config_CellBased_BinEdges_Eta, std::abs(etaCurConst));
395  int numTrack = inSeed->getTauJet()->nTracks();
396  if(numTrack == 1) { mvaCorrection = m_Config_CellBased_EtaBinned_Pi0MVACut_1prong.at(etaBinIndex); }
397  else { mvaCorrection = m_Config_CellBased_EtaBinned_Pi0MVACut_3prong.at(etaBinIndex); }
398 
399  value_BDT = value_BDT - mvaCorrection;
400  }
401 
402  std::string iConst = m_HelperFunctions.convertNumberToString((double)(iTypeConst+1));
403  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_BDTValues_BDTSort_" + iConst, value_BDT);
404 
405  }
406 
409  //only execute if the constituent type is neutral
410  if(PanTau::TauConstituent::isNeutralType(tauConstituentType)) {
411 
412  TLorentzVector totalTLV_SumShots = TLorentzVector(0., 0., 0., 0.);
413  unsigned int totalPhotonsInSeed = 0;
414  double maxDeltaRSumShotToConst = -999;
415  double minDeltaRSumShotToConst = 999;
416  double maxDeltaRSumShotToTau = -999;
417  double minDeltaRSumShotToTau = 999;
418 
419  std::vector<TLorentzVector> allShotTLVs = std::vector<TLorentzVector>(0);
420 
421  for(unsigned int iConst=0; iConst<list_TypeConstituents_SortBDT.size(); iConst++) {
422 
423  PanTau::TauConstituent* curConst = list_TypeConstituents_SortBDT.at(iConst);
424  TLorentzVector tlv_CurConst = curConst->p4();
425  std::vector<PanTau::TauConstituent*> shotConstituents = curConst->getShots();
426  unsigned int nShots = shotConstituents.size();
427 
428  unsigned int totalPhotonsInNeutral = 0;
429  TLorentzVector tlv_SumShots = TLorentzVector(0., 0., 0., 0.);
430 
431  for(unsigned int iShot=0; iShot<nShots; iShot++) {
432  PanTau::TauConstituent* curShot = shotConstituents.at(iShot);
433  totalPhotonsInNeutral += curShot->getNPhotonsInShot();
434  tlv_SumShots += curShot->p4();
435  allShotTLVs.push_back(curShot->p4());
436  }//end loop over shots
437  totalTLV_SumShots += tlv_SumShots;
438  totalPhotonsInSeed += totalPhotonsInNeutral;
439 
440  std::string iConstStr = m_HelperFunctions.convertNumberToString((double)(iConst+1));
441 
442  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_nPhotons_BDTSort_" + iConstStr, totalPhotonsInNeutral);
443 
444  //energy ratio, deltaR of sumShots and constituent
445  double deltaRSumShotToConst = tlv_CurConst.DeltaR(tlv_SumShots);
446  if(deltaRSumShotToConst > maxDeltaRSumShotToConst) maxDeltaRSumShotToConst = deltaRSumShotToConst;
447  if(deltaRSumShotToConst < minDeltaRSumShotToConst) minDeltaRSumShotToConst = deltaRSumShotToConst;
448 
449  if(tlv_CurConst.Et() > 0.) tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtSumShotsOverConstEt_BDTSort_" + iConstStr, tlv_SumShots.Et() / tlv_CurConst.Et());
450 
451  //energy ratio, deltaR of shots and tauSeed
452  double deltaRSumShotToTau = tlv_Reference.DeltaR(tlv_SumShots);
453  if(deltaRSumShotToTau > maxDeltaRSumShotToTau) maxDeltaRSumShotToTau = deltaRSumShotToTau;
454  if(deltaRSumShotToTau < minDeltaRSumShotToTau) minDeltaRSumShotToTau = deltaRSumShotToTau;
455 
456  }//end loop over constituents in tau
457 
458  //number of shots in seed
459  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_NPhotonsInSeed", totalPhotonsInSeed);
460 
461  }//end if check for shot info dumping
462 
463 
465  prefixVARType = m_varTypeName_Ratio;
466 
467  if(curTypeName != curTypeName_All) addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtOver", sum_Et, variants_SeedEt);
468 
469  if(tlv_1st_Et.Pt() != 0) addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_1stEtOver", tlv_1st_Et.Et(), variants_SeedEt);
470  if(tlv_1st_BDT.Pt() != 0) addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_1stBDTEtOver", tlv_1st_BDT.Et(), variants_SeedEt);
471 
472  if(tlv_Last_Et.Pt() != 0) addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_SoftestEtOver", tlv_Last_Et.Et(), variants_SeedEt);
473 
474  if(tlv_1st_Et.Pt() != 0 && sum_Et > 0.) tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_1stEtOverTypeEt", tlv_1st_Et.Et() / sum_Et);
475  if(tlv_1st_BDT.Pt() != 0 && sum_Et > 0.) tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_1stBDTEtOverTypeEt", tlv_1st_BDT.Et() / sum_Et);
476 
478  if(curTypeName == curTypeName_All) {
479  prefixVARType = m_varTypeName_EtInRing;
480 
481  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_00To01", sum_EtInRing00To01);
482  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_01To02", sum_EtInRing01To02);
483  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_02To03", sum_EtInRing02To03);
484  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_03To04", sum_EtInRing03To04);
485  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_04To05", sum_EtInRing04To05);
486  }
487 
488 
490  if(curTypeName == curTypeName_All) {
491  prefixVARType = m_varTypeName_Isolation;
492 
493  double iso_EtIn01 = sum_EtInRing00To01;
494  double iso_EtIn02 = iso_EtIn01 + sum_EtInRing01To02;
495  double iso_EtIn03 = iso_EtIn02 + sum_EtInRing02To03;
496  double iso_EtIn04 = iso_EtIn03 + sum_EtInRing03To04;
497 
498  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn01Over", iso_EtIn01, variants_SeedEt);
499  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn02Over", iso_EtIn02, variants_SeedEt);
500  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn03Over", iso_EtIn03, variants_SeedEt);
501  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn04Over", iso_EtIn04, variants_SeedEt);
502 
503  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn00To02Over", (sum_EtInRing00To01 + sum_EtInRing01To02), variants_SeedEt);
504  addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn02To04Over", (sum_EtInRing02To03 + sum_EtInRing03To04), variants_SeedEt);
505 
506  if(iso_EtIn02>0.) tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn01OverEtIn02", iso_EtIn01 / iso_EtIn02);
507  if(iso_EtIn04>0.) tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtIn01OverEtIn04", iso_EtIn01 / iso_EtIn04);
508  }
509 
511  prefixVARType = m_varTypeName_StdDev;
512 
513  double stddev_Et = m_HelperFunctions.stddev(sum_Et2, sum_Et, num_EFOs);
514 
515  if(stddev_Et > 0.) addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_Et_Wrt", stddev_Et, variants_SeedEt);
516 
518  // Moment wrt X = Sum( Et * X ) / Sum(Et)
519  // ==> Named as Eflow_EFOType_JetMoment_EtX" when using Et as weight
520  // ==> Named as Eflow_EFOType_JetMoment_EX" when using E as weight
521  prefixVARType = m_varTypeName_JetMoment;
522 
523  if(sum_Et > 0.) {
524  //Using transverse energy
525  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtDR", sum_EtxDR / sum_Et);
526  tauFeatureMap->addFeature(inputAlgName + "_" + curTypeName + "_" + prefixVARType + "_EtDRxTotalEt", (sum_EtxDR / sum_Et) * variants_SeedEt.at("EtAllConsts"));
527  }
528 
529  return StatusCode::SUCCESS;
530 }

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

◆ execute()

StatusCode PanTau::Tool_FeatureExtractor::execute ( PanTau::PanTauSeed inSeed) const
overridevirtual

Implements PanTau::ITool_PanTauTools.

Definition at line 111 of file Tool_FeatureExtractor.cxx.

111  {
112 
113  bool noAnyConstituents = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoConstituentsAtAll);
114  bool noSelConstituents = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoSelectedConstituents);
115  bool noValidInputTau = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoValidInputTau);
116  bool isBadSeed = (noAnyConstituents || noSelConstituents || noValidInputTau);
117  if(static_cast<bool>(m_Config_UseEmptySeeds)) isBadSeed = noValidInputTau;
118 
119  if (isBadSeed) {
120  ATH_MSG_DEBUG("Seed is not valid for feature extraction (no constituents or no valid input tau) - just fill isPanTauCandidate feature");
121  inSeed->getFeatures()->addFeature(inSeed->getNameInputAlgorithm() + "_" + m_varTypeName_Basic + "_isPanTauCandidate", 0);
122  return StatusCode::SUCCESS;
123  }
124  inSeed->getFeatures()->addFeature(inSeed->getNameInputAlgorithm() + "_" + m_varTypeName_Basic + "_isPanTauCandidate", 1);
125 
126 
128 
129  ATH_CHECK( addConstituentMomenta(inSeed) );
130 
131  // map containing different methods to calc seed et
132  std::map<std::string, double> variants_SeedEt;
133  // calculate the Et variants for the seed
134  fillVariantsSeedEt(inSeed->getConstituentsAsList_All(), variants_SeedEt);
135 
136  //loop through all types of Constituents in tau and calculate type features for them
137  //baseline
138  ATH_CHECK( calculateFeatures(inSeed, PanTau::TauConstituent::t_NoType, variants_SeedEt) ); //=> all constituents
139  ATH_CHECK( calculateFeatures(inSeed, PanTau::TauConstituent::t_Charged, variants_SeedEt) ); //=> charged ones in core
140  ATH_CHECK( calculateFeatures(inSeed, PanTau::TauConstituent::t_Neutral, variants_SeedEt) ); //=> neutral ones in core
141  ATH_CHECK( calculateFeatures(inSeed, PanTau::TauConstituent::t_Pi0Neut, variants_SeedEt) ); //=> pi0 tagged ones in core
142 
143  //fill the combined features
144  ATH_CHECK( addCombinedFeatures(inSeed, variants_SeedEt) );
145 
146  return StatusCode::SUCCESS;
147 }

◆ 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

◆ fillVariantsSeedEt()

void PanTau::Tool_FeatureExtractor::fillVariantsSeedEt ( const std::vector< PanTau::TauConstituent * > &  tauConstituents,
std::map< std::string, double > &  variants_SeedEt 
)
staticprotected

Definition at line 75 of file Tool_FeatureExtractor.cxx.

76  {
77 
78  //use different approaches to calculate total energy of seed:
79  variants_SeedEt["EtAllConsts"] = 0.0;
80 
81  //loop over all constituents in seed
82  for (unsigned int iConst = 0; iConst < tauConstituents.size(); iConst++) {
83 
84  //get current constituents
85  PanTau::TauConstituent* curConstituent = tauConstituents.at(iConst);
86  double curEt = curConstituent->p4().Et();
87 
88  //update the different Et definitions
89  if (curConstituent->isOfType(PanTau::TauConstituent::t_Charged) ||
90  curConstituent->isOfType(PanTau::TauConstituent::t_Neutral) ) {
91  variants_SeedEt["EtAllConsts"] += curEt;
92  }
93  }//end loop over constituents in seed
94 }

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

◆ initialize()

StatusCode PanTau::Tool_FeatureExtractor::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 40 of file Tool_FeatureExtractor.cxx.

40  {
41 
42  ATH_MSG_INFO(" initialize()");
43  m_init=true;
44 
46  ATH_CHECK( m_Tool_InformationStore.retrieve() );
47 
48  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Sum", m_varTypeName_Sum) );
49  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Ratio", m_varTypeName_Ratio) );
50  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_EtInRing", m_varTypeName_EtInRing) );
51  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Isolation", m_varTypeName_Isolation) );
52  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Num", m_varTypeName_Num) );
53  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Mean", m_varTypeName_Mean) );
54  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_StdDev", m_varTypeName_StdDev) );
55  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_HLV", m_varTypeName_HLV) );
56  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Angle", m_varTypeName_Angle) );
57  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_DeltaR", m_varTypeName_DeltaR) );
58  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_JetMoment", m_varTypeName_JetMoment) );
59  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Combined", m_varTypeName_Combined) );
60  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_JetShape", m_varTypeName_JetShape) );
61  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_ImpactParams", m_varTypeName_ImpactParams) );
62  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Basic", m_varTypeName_Basic) );
63  ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_PID", m_varTypeName_PID) );
64 
65  ATH_CHECK( m_Tool_InformationStore->getInfo_Int("FeatureExtractor_UseEmptySeeds", m_Config_UseEmptySeeds) );
66 
67  ATH_CHECK( m_Tool_InformationStore->getInfo_VecDouble("CellBased_BinEdges_Eta", m_Config_CellBased_BinEdges_Eta) );
68  ATH_CHECK( m_Tool_InformationStore->getInfo_VecDouble("CellBased_EtaBinned_Pi0MVACut_1prong", m_Config_CellBased_EtaBinned_Pi0MVACut_1prong) );
69  ATH_CHECK( m_Tool_InformationStore->getInfo_VecDouble("CellBased_EtaBinned_Pi0MVACut_3prong", m_Config_CellBased_EtaBinned_Pi0MVACut_3prong) );
70 
71  return StatusCode::SUCCESS;
72 }

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

◆ isInitialized()

bool PanTau::Tool_FeatureExtractor::isInitialized ( )
inlineoverridevirtual

Implements PanTau::ITool_PanTauTools.

Definition at line 122 of file Tool_FeatureExtractor.h.

122 {return m_init;}

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

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

◆ varTypeName_Angle()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Angle ( )
inlinestaticprotected

Definition at line 92 of file Tool_FeatureExtractor.h.

92 {return "Angle";}

◆ varTypeName_Basic()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Basic ( )
inlinestaticprotected

Definition at line 98 of file Tool_FeatureExtractor.h.

98 {return "Basic";}

◆ varTypeName_Combined()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Combined ( )
inlinestaticprotected

Definition at line 95 of file Tool_FeatureExtractor.h.

95 {return "Combined";}

◆ varTypeName_DeltaR()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_DeltaR ( )
inlinestaticprotected

Definition at line 93 of file Tool_FeatureExtractor.h.

93 {return "DeltaR";}

◆ varTypeName_EtInRing()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_EtInRing ( )
inlinestaticprotected

Definition at line 86 of file Tool_FeatureExtractor.h.

86 {return "EtInRing";}

◆ varTypeName_HLV()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_HLV ( )
inlinestaticprotected

Definition at line 91 of file Tool_FeatureExtractor.h.

91 {return "HLV";}

◆ varTypeName_ImpactParams()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_ImpactParams ( )
inlinestaticprotected

Definition at line 97 of file Tool_FeatureExtractor.h.

97 {return "ImpactParams";}

◆ varTypeName_Isolation()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Isolation ( )
inlinestaticprotected

Definition at line 87 of file Tool_FeatureExtractor.h.

87 {return "Isolation";}

◆ varTypeName_JetMoment()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_JetMoment ( )
inlinestaticprotected

Definition at line 94 of file Tool_FeatureExtractor.h.

94 {return "JetMoment";}

◆ varTypeName_JetShape()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_JetShape ( )
inlinestaticprotected

Definition at line 96 of file Tool_FeatureExtractor.h.

96 {return "JetShape";}

◆ varTypeName_Mean()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Mean ( )
inlinestaticprotected

Definition at line 89 of file Tool_FeatureExtractor.h.

89 {return "Mean";}

◆ varTypeName_Num()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Num ( )
inlinestaticprotected

Definition at line 88 of file Tool_FeatureExtractor.h.

88 {return "Num";}

◆ varTypeName_PID()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_PID ( )
inlinestaticprotected

Definition at line 99 of file Tool_FeatureExtractor.h.

99 {return "PID";}

◆ varTypeName_Ratio()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Ratio ( )
inlinestaticprotected

Definition at line 85 of file Tool_FeatureExtractor.h.

85 {return "Ratio";}

◆ varTypeName_Shots()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Shots ( )
inlinestaticprotected

Definition at line 100 of file Tool_FeatureExtractor.h.

100 {return "Shots";}

◆ varTypeName_StdDev()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_StdDev ( )
inlinestaticprotected

Definition at line 90 of file Tool_FeatureExtractor.h.

90 {return "StdDev";}

◆ varTypeName_Sum()

static const std::string PanTau::Tool_FeatureExtractor::varTypeName_Sum ( )
inlinestaticprotected

Definition at line 84 of file Tool_FeatureExtractor.h.

84 {return "Sum";}

Member Data Documentation

◆ m_Config_CellBased_BinEdges_Eta

std::vector<double> PanTau::Tool_FeatureExtractor::m_Config_CellBased_BinEdges_Eta
protected

Helper members.

Definition at line 79 of file Tool_FeatureExtractor.h.

◆ m_Config_CellBased_EtaBinned_Pi0MVACut_1prong

std::vector<double> PanTau::Tool_FeatureExtractor::m_Config_CellBased_EtaBinned_Pi0MVACut_1prong
protected

Definition at line 80 of file Tool_FeatureExtractor.h.

◆ m_Config_CellBased_EtaBinned_Pi0MVACut_3prong

std::vector<double> PanTau::Tool_FeatureExtractor::m_Config_CellBased_EtaBinned_Pi0MVACut_3prong
protected

Definition at line 81 of file Tool_FeatureExtractor.h.

◆ m_Config_UseEmptySeeds

int PanTau::Tool_FeatureExtractor::m_Config_UseEmptySeeds = 0
protected

Definition at line 75 of file Tool_FeatureExtractor.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_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_HelperFunctions

PanTau::HelperFunctions PanTau::Tool_FeatureExtractor::m_HelperFunctions
protected

Definition at line 46 of file Tool_FeatureExtractor.h.

◆ m_init

bool PanTau::Tool_FeatureExtractor::m_init =false
protected

Definition at line 119 of file Tool_FeatureExtractor.h.

◆ m_Tool_InformationStore

ToolHandle<PanTau::ITool_InformationStore> PanTau::Tool_FeatureExtractor::m_Tool_InformationStore {this, "Tool_InformationStore", "PanTau::Tool_InformationStore/Tool_InformationStore","Tool handle to the information store tool"}
protected

Definition at line 47 of file Tool_FeatureExtractor.h.

◆ m_Tool_InformationStoreName

Gaudi::Property<std::string> PanTau::Tool_FeatureExtractor::m_Tool_InformationStoreName {this, "Tool_InformationStoreName", "", "Tool handle to the information store tool"}
protected

Definition at line 48 of file Tool_FeatureExtractor.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_varTypeName_Angle

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Angle
protected

Definition at line 110 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Basic

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Basic
protected

Definition at line 116 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Combined

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Combined
protected

Definition at line 113 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_DeltaR

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_DeltaR
protected

Definition at line 111 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_EtInRing

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_EtInRing
protected

Definition at line 104 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_HLV

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_HLV
protected

Definition at line 109 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_ImpactParams

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_ImpactParams
protected

Definition at line 115 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Isolation

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Isolation
protected

Definition at line 105 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_JetMoment

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_JetMoment
protected

Definition at line 112 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_JetShape

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_JetShape
protected

Definition at line 114 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Mean

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Mean
protected

Definition at line 107 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Num

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Num
protected

Definition at line 106 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_PID

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_PID
protected

Definition at line 117 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Ratio

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Ratio
protected

Definition at line 103 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_StdDev

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_StdDev
protected

Definition at line 108 of file Tool_FeatureExtractor.h.

◆ m_varTypeName_Sum

std::string PanTau::Tool_FeatureExtractor::m_varTypeName_Sum
protected

Definition at line 102 of file Tool_FeatureExtractor.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
PanTau::Tool_FeatureExtractor::addCombinedFeatures
StatusCode addCombinedFeatures(PanTau::PanTauSeed *inSeed, const std::map< std::string, double > &variants_SeedEt) const
Definition: Tool_FeatureExtractor.cxx:533
PanTau::Tool_FeatureExtractor::calculateBasicFeatures
StatusCode calculateBasicFeatures(PanTau::PanTauSeed *inSeed) const
Definition: Tool_FeatureExtractor.cxx:150
PanTau::Tool_FeatureExtractor::fillVariantsSeedEt
static void fillVariantsSeedEt(const std::vector< PanTau::TauConstituent * > &tauConstituents, std::map< std::string, double > &variants_SeedEt)
Definition: Tool_FeatureExtractor.cxx:75
PanTau::PanTauSeed::getProtoMomentumWide
TLorentzVector getProtoMomentumWide() const
Definition: PanTauSeed.h:232
PanTau::Tool_FeatureExtractor::m_Config_CellBased_EtaBinned_Pi0MVACut_3prong
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_3prong
Definition: Tool_FeatureExtractor.h:81
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PanTau::Tool_FeatureExtractor::m_varTypeName_Basic
std::string m_varTypeName_Basic
Definition: Tool_FeatureExtractor.h:116
PanTau::PanTauSeed::getConstituentsAsList_Wide
const std::vector< PanTau::TauConstituent * > & getConstituentsAsList_Wide() const
Definition: PanTauSeed.h:236
PanTau::TauConstituent::t_Neutral
@ t_Neutral
Definition: TauConstituent.h:45
PanTau::TauConstituent::Type
Type
Type enumeration to specify type of this tau constituent.
Definition: TauConstituent.h:42
PanTau::PanTauSeed::getFeatures
const PanTau::TauFeature * getFeatures() const
Definition: PanTauSeed.h:230
PanTau::Tool_FeatureExtractor::m_varTypeName_Num
std::string m_varTypeName_Num
Definition: Tool_FeatureExtractor.h:106
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:402
PanTau::Tool_FeatureExtractor::m_varTypeName_JetMoment
std::string m_varTypeName_JetMoment
Definition: Tool_FeatureExtractor.h:112
PanTau::PanTauSeed::getTauJet
const xAOD::TauJet * getTauJet() const
Definition: PanTauSeed.h:228
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PanTau::PanTauSeed::getSubsystemHLV
TLorentzVector getSubsystemHLV(int tauConstituent_Type, bool &foundit)
Definition: PanTauSeed.cxx:379
PanTau::Tool_FeatureExtractor::m_Tool_InformationStoreName
Gaudi::Property< std::string > m_Tool_InformationStoreName
Definition: Tool_FeatureExtractor.h:48
PanTau::PanTauSeed::getConstituentsAsList_All
const std::vector< PanTau::TauConstituent * > & getConstituentsAsList_All() const
Definition: PanTauSeed.h:237
PanTau::TauConstituent::t_Charged
@ t_Charged
Definition: TauConstituent.h:44
PanTau::PanTauSeed::getNameInputAlgorithm
const std::string & getNameInputAlgorithm() const
Definition: PanTauSeed.h:227
PanTau::Tool_FeatureExtractor::m_varTypeName_ImpactParams
std::string m_varTypeName_ImpactParams
Definition: Tool_FeatureExtractor.h:115
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PanTau::Tool_FeatureExtractor::m_varTypeName_EtInRing
std::string m_varTypeName_EtInRing
Definition: Tool_FeatureExtractor.h:104
PanTau::PanTauSeed::getConstituentsOfType
std::vector< PanTau::TauConstituent * > getConstituentsOfType(int tauConstituent_Type, bool &foundit)
Definition: PanTauSeed.cxx:358
PanTau::Tool_FeatureExtractor::m_varTypeName_Isolation
std::string m_varTypeName_Isolation
Definition: Tool_FeatureExtractor.h:105
met::DeltaR
@ DeltaR
Definition: METRecoCommon.h:11
PanTau::PanTauSeed::t_NoValidInputTau
@ t_NoValidInputTau
Definition: PanTauSeed.h:34
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
skel.it
it
Definition: skel.GENtoEVGEN.py:407
PanTau::TauFeature::addFeature
bool addFeature(const std::string &name, const double value)
adds a new feature
Definition: TauFeature.cxx:44
PanTau::Tool_FeatureExtractor::m_varTypeName_Angle
std::string m_varTypeName_Angle
Definition: Tool_FeatureExtractor.h:110
PanTau::TauConstituent::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle as a TLorentzVector.
Definition: TauConstituent.cxx:100
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
PanTau::TauConstituent::getNPhotonsInShot
int getNPhotonsInShot() const
Definition: TauConstituent.cxx:255
PanTau::Tool_FeatureExtractor::m_init
bool m_init
Definition: Tool_FeatureExtractor.h:119
athena.value
value
Definition: athena.py:124
PanTau::Tool_FeatureExtractor::addFeatureWrtSeedEnergy
static void addFeatureWrtSeedEnergy(PanTau::TauFeature *targetMap, const std::string &featName, double numerator, const std::map< std::string, double > &denominatorMap)
Definition: Tool_FeatureExtractor.cxx:97
PanTau::TauFeature
Definition: TauFeature.h:19
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PanTau::Tool_FeatureExtractor::m_varTypeName_Ratio
std::string m_varTypeName_Ratio
Definition: Tool_FeatureExtractor.h:103
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
PanTau::Tool_FeatureExtractor::m_varTypeName_DeltaR
std::string m_varTypeName_DeltaR
Definition: Tool_FeatureExtractor.h:111
PanTau::Tool_FeatureExtractor::m_varTypeName_JetShape
std::string m_varTypeName_JetShape
Definition: Tool_FeatureExtractor.h:114
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
PanTau::Tool_FeatureExtractor::m_Tool_InformationStore
ToolHandle< PanTau::ITool_InformationStore > m_Tool_InformationStore
Definition: Tool_FeatureExtractor.h:47
PanTau::TauConstituent::isNeutralType
static bool isNeutralType(int tauConstituentType)
Definition: TauConstituent.cxx:171
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PanTau::TauConstituent::AllConstituentsName
static std::string AllConstituentsName()
Definition: TauConstituent.h:56
PanTau::TauConstituent::getTypeName
std::vector< std::string > getTypeName() const
Definition: TauConstituent.cxx:183
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PanTau::HelperFunctions::getBinIndex
virtual int getBinIndex(const std::vector< double > &binEdges, double value) const
Definition: Reconstruction/PanTau/PanTauAlgs/Root/HelperFunctions.cxx:22
PanTau::Tool_FeatureExtractor::m_varTypeName_Combined
std::string m_varTypeName_Combined
Definition: Tool_FeatureExtractor.h:113
PanTau::HelperFunctions::convertNumberToString
virtual std::string convertNumberToString(double x) const
Definition: Reconstruction/PanTau/PanTauAlgs/Root/HelperFunctions.cxx:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
PanTau::Tool_FeatureExtractor::varTypeName_Shots
static const std::string varTypeName_Shots()
Definition: Tool_FeatureExtractor.h:100
PanTau::Tool_FeatureExtractor::m_HelperFunctions
PanTau::HelperFunctions m_HelperFunctions
Definition: Tool_FeatureExtractor.h:46
PanTau::Tool_FeatureExtractor::m_varTypeName_Sum
std::string m_varTypeName_Sum
Definition: Tool_FeatureExtractor.h:102
PanTau::Tool_FeatureExtractor::calculateFeatures
StatusCode calculateFeatures(PanTau::PanTauSeed *inSeed, int tauConstituentType, const std::map< std::string, double > &variants_SeedEt) const
Definition: Tool_FeatureExtractor.cxx:257
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::UncalibMeasType::nTypes
@ nTypes
WriteCellNoiseToCool.FullName
FullName
Definition: WriteCellNoiseToCool.py:514
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
PanTau::HelperFunctions::bindToolHandle
static StatusCode bindToolHandle(ToolHandle< T > &, std::string)
Definition: Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h:56
PanTau::PanTauSeed::t_NoConstituentsAtAll
@ t_NoConstituentsAtAll
Definition: PanTauSeed.h:35
PanTau::TauConstituent::isOfType
bool isOfType(TauConstituent::Type aType) const
Definition: TauConstituent.cxx:216
PanTau::Tool_FeatureExtractor::m_Config_UseEmptySeeds
int m_Config_UseEmptySeeds
Definition: Tool_FeatureExtractor.h:75
PanTau::TauConstituent::t_Pi0Neut
@ t_Pi0Neut
Definition: TauConstituent.h:46
PanTau::Tool_FeatureExtractor::m_Config_CellBased_BinEdges_Eta
std::vector< double > m_Config_CellBased_BinEdges_Eta
Helper members.
Definition: Tool_FeatureExtractor.h:79
PanTau::Tool_FeatureExtractor::m_varTypeName_PID
std::string m_varTypeName_PID
Definition: Tool_FeatureExtractor.h:117
PanTau::Tool_FeatureExtractor::m_varTypeName_StdDev
std::string m_varTypeName_StdDev
Definition: Tool_FeatureExtractor.h:108
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
PanTau::HelperFunctions::stddev
virtual double stddev(double sumOfSquares, double sumOfValues, int numConsts) const
Definition: Reconstruction/PanTau/PanTauAlgs/Root/HelperFunctions.cxx:37
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
sortTauConstituentEt
bool sortTauConstituentEt(const PanTau::TauConstituent *u, const PanTau::TauConstituent *v)
Definition: Tool_FeatureExtractor.cxx:29
PanTau::PanTauSeed::isOfTechnicalQuality
bool isOfTechnicalQuality(int pantauSeed_TechnicalQuality) const
Definition: PanTauSeed.cxx:349
PanTau::TauConstituent::t_NoType
@ t_NoType
Definition: TauConstituent.h:43
sortTauConstituentMVA
bool sortTauConstituentMVA(const PanTau::TauConstituent *u, const PanTau::TauConstituent *v)
Definition: Tool_FeatureExtractor.cxx:24
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
PanTau::PanTauSeed::t_NoSelectedConstituents
@ t_NoSelectedConstituents
Definition: PanTauSeed.h:36
PanTau::Tool_FeatureExtractor::addConstituentMomenta
StatusCode addConstituentMomenta(PanTau::PanTauSeed *inSeed) const
Definition: Tool_FeatureExtractor.cxx:212
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
PanTau::PanTauSeed::getProtoMomentumCore
TLorentzVector getProtoMomentumCore() const
Definition: PanTauSeed.h:233
PanTau::TauConstituent::t_nTypes
@ t_nTypes
Definition: TauConstituent.h:51
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
PanTau::TauConstituent
Definition: TauConstituent.h:25
PanTau::Tool_FeatureExtractor::m_Config_CellBased_EtaBinned_Pi0MVACut_1prong
std::vector< double > m_Config_CellBased_EtaBinned_Pi0MVACut_1prong
Definition: Tool_FeatureExtractor.h:80
DiTauMassTools::Angle
double Angle(const VectorType1 &vec1, const VectorType2 &vec2)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:61
SG::DataProxy
Definition: DataProxy.h:45
PanTau::Tool_FeatureExtractor::m_varTypeName_Mean
std::string m_varTypeName_Mean
Definition: Tool_FeatureExtractor.h:107
PanTau::PanTauSeed::getConstituentsAsList_Core
const std::vector< PanTau::TauConstituent * > & getConstituentsAsList_Core() const
Definition: PanTauSeed.h:235
PanTau::TauConstituent::getCharge
int getCharge() const
Definition: TauConstituent.cxx:225
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
PanTau::TauConstituent::getShots
const std::vector< TauConstituent * > & getShots() const
Definition: TauConstituent.cxx:240
PanTau::Tool_FeatureExtractor::m_varTypeName_HLV
std::string m_varTypeName_HLV
Definition: Tool_FeatureExtractor.h:109
fitman.k
k
Definition: fitman.py:528
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65