ATLAS Offline Software
IJetTruthMatching.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IJetTruthMatching.h
7 // Header file for class IJetTruthMatching
9 // (c) ATLAS Detector software
11 // Andreas.Wildauer@cern.ch
13 
14 
15 #ifndef PARTICLEJETTOOLS_IJETTRUTHMATCHING_H
16 #define PARTICLEJETTOOLS_IJETTRUTHMATCHING_H
17 
18 // Gaudi
19 #include "AsgTools/IAsgTool.h"
20 #include "xAODJet/Jet.h"
21 #include <map>
22 #include <string>
23 
24 class Jet;
25 
26 namespace Analysis
27 {
28 
29  // static const InterfaceID IID_IJetTruthMatching("IJetTruthMatching", 1, 0);
30 
39  class IJetTruthMatching : virtual public asg::IAsgTool {
41  public:
42 
43  struct MatchInfo {
44  // Predefined name to label the jets passing the matching.
45  int jetLabel = 0;
46 
47  // Number of MC Events in the McEventCollection
49 
50  // Barcode of the matched parton (to be able to find the parton in the McEventColl)
51  int barcode = 0;
52 
53  // pdg code of the parton/baryon the jet has been matched to (which was closest)
54  int pdg = 0;
55 
56  // Keep track of distances to quarks.
57  std::map<std::string, double> distanceToQuarks;
58 
59  // Position of the lowest lying B hadron vertex decay
60  //Eigen::Vector3d BDecVtx;
61  //int Bpdg
62 
63  double deltaRMinTo (const std::string& key) const
64  {
65  auto it = distanceToQuarks.find (key);
66  if (it != distanceToQuarks.end())
67  return it->second;
68  return 9999;
69  }
70  };
71 
73  virtual ~IJetTruthMatching(){};
74 
76  // static const InterfaceID& interfaceID() { return IID_IJetTruthMatching; };
77 
79  virtual bool matchJet(const xAOD::Jet& myJet,
80  MatchInfo* info = nullptr) const = 0;
81  //virtual bool matchJet(const Jet& myJet) = 0;
82 
84  virtual void printParameterSettings() const = 0;
85  };
86 
87 } // end of namespace
88 
89 #endif // PARTICLEJETTOOLS_IJETTRUTHMATCHING_H
90 
grepfile.info
info
Definition: grepfile.py:38
Analysis::IJetTruthMatching::MatchInfo::deltaRMinTo
double deltaRMinTo(const std::string &key) const
Definition: IJetTruthMatching.h:63
Jet.h
Analysis::IJetTruthMatching::~IJetTruthMatching
virtual ~IJetTruthMatching()
Virtual destructor.
Definition: IJetTruthMatching.h:73
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
Analysis::IJetTruthMatching::MatchInfo::distanceToQuarks
std::map< std::string, double > distanceToQuarks
Definition: IJetTruthMatching.h:57
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
skel.it
it
Definition: skel.GENtoEVGEN.py:423
Analysis::IJetTruthMatching::MatchInfo
Definition: IJetTruthMatching.h:43
Analysis::IJetTruthMatching::MatchInfo::pdg
int pdg
Definition: IJetTruthMatching.h:54
Analysis::IJetTruthMatching::matchJet
virtual bool matchJet(const xAOD::Jet &myJet, MatchInfo *info=nullptr) const =0
AlgTool interface methods.
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
IAsgTool.h
Analysis::IJetTruthMatching::MatchInfo::NEventInCollection
int NEventInCollection
Definition: IJetTruthMatching.h:48
Analysis::IJetTruthMatching::MatchInfo::barcode
int barcode
Definition: IJetTruthMatching.h:51
Analysis::IJetTruthMatching
Definition: IJetTruthMatching.h:39
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Analysis::IJetTruthMatching::MatchInfo::jetLabel
int jetLabel
Definition: IJetTruthMatching.h:45
Analysis::IJetTruthMatching::printParameterSettings
virtual void printParameterSettings() const =0
print parameter settings of the truth match tool
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37