ATLAS Offline Software
TruthInfo.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "JetTagInfo/TruthInfo.h"
6 #include <algorithm>
7 #include <utility>
8 
9 namespace Analysis
10 {
11 
14  : BaseTagInfo(),
15  m_jetTruthLabel("N/A"),
16  m_distanceToBQuark (999.),
17  m_distanceToCQuark (999.),
18  m_distanceToTLepton (999.),
19  m_BHadronPdg (0)
20 {}
21 
23 TruthInfo::TruthInfo(const TagInfoType& tagJetInfoType)
24  : BaseTagInfo(tagJetInfoType),
25  m_jetTruthLabel("N/A"),
26  m_distanceToBQuark (999.),
27  m_distanceToCQuark (999.),
28  m_distanceToTLepton (999.),
29  m_BHadronPdg (0)
30 {}
31 
36  m_jetTruthLabel(rhs.m_jetTruthLabel),
37  m_distanceToBQuark(rhs.m_distanceToBQuark),
38  m_distanceToCQuark(rhs.m_distanceToCQuark),
39  m_distanceToTLepton(rhs.m_distanceToTLepton),
40  m_BHadronDecayVertex(rhs.m_BHadronDecayVertex),
41  m_BHadronPdg(rhs.m_BHadronPdg)
42 {}
43 
46 {
47  if (this!=&rhs)
48  {
55  }
56  return *this;
57 }
58 
61 {}
62 
63 void TruthInfo::deltaRMinTo(const std::string& key, double dR) {
64  if( "B"==key || "b"==key ) m_distanceToBQuark = dR;
65  if( "C"==key || "c"==key ) m_distanceToCQuark = dR;
66  if( "T"==key || "t"==key ) m_distanceToTLepton = dR;
67 }
68 
69 double TruthInfo::deltaRMinTo(const std::string& key) const {
70  double dR = 9999.;
71  if( "B"==key || "b"==key ) dR = m_distanceToBQuark;
72  if( "C"==key || "c"==key ) dR = m_distanceToCQuark;
73  if( "T"==key || "t"==key ) dR = m_distanceToTLepton;
74  return dR;
75 }
76 
77 }
Analysis::TruthInfo::operator=
TruthInfo & operator=(const TruthInfo &rhs)
assigenment operator
Definition: TruthInfo.cxx:45
Analysis::TruthInfo::m_distanceToBQuark
double m_distanceToBQuark
Definition: TruthInfo.h:62
Analysis::BaseTagInfo
Class BasetagInfo: Implements methods defined in ITagInfo.
Definition: BaseTagInfo.h:40
Analysis::TruthInfo::~TruthInfo
virtual ~TruthInfo()
default destructor
Definition: TruthInfo.cxx:60
Analysis::TagInfoType
std::string TagInfoType
Definition: JetTagInfoBase.h:19
Analysis::TruthInfo::m_jetTruthLabel
std::string m_jetTruthLabel
Definition: TruthInfo.h:61
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::TruthInfo::deltaRMinTo
void deltaRMinTo(const std::string &key, double dR)
min deltaR to quarks:
Definition: TruthInfo.cxx:63
TruthInfo.h
Analysis::TruthInfo::m_distanceToTLepton
double m_distanceToTLepton
Definition: TruthInfo.h:64
Analysis::TruthInfo::TruthInfo
TruthInfo()
default constructor
Definition: TruthInfo.cxx:13
Analysis::TruthInfo
Class TruthInfo: Class to store more truth information about a JetTag (e.g.
Definition: TruthInfo.h:19
Analysis::TruthInfo::m_BHadronDecayVertex
Eigen::Vector3d m_BHadronDecayVertex
Definition: TruthInfo.h:65
Analysis::TruthInfo::m_distanceToCQuark
double m_distanceToCQuark
Definition: TruthInfo.h:63
Analysis::TruthInfo::m_BHadronPdg
int m_BHadronPdg
Definition: TruthInfo.h:66
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37