ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Analysis::TruthInfo Class Reference

Class TruthInfo: Class to store more truth information about a JetTag (e.g. More...

#include <TruthInfo.h>

Inheritance diagram for Analysis::TruthInfo:
Collaboration diagram for Analysis::TruthInfo:

Public Member Functions

 TruthInfo ()
 default constructor More...
 
 TruthInfo (const TagInfoType &x)
 constructor with info type More...
 
 TruthInfo (const TruthInfo &TruthInfo)
 copy destructor More...
 
TruthInfooperator= (const TruthInfo &rhs)
 assigenment operator More...
 
virtual ~TruthInfo ()
 default destructor More...
 
virtual TruthInfoclone () const
 clone method More...
 
const std::string & jetTruthLabel () const
 return the truth label More...
 
void setJetTruthLabel (const std::string &jetTruthLabel)
 set the truth label The string with which to set the truth label is stored in the JetTruthMatch algtool itself. More...
 
void deltaRMinTo (const std::string &key, double dR)
 min deltaR to quarks: More...
 
double deltaRMinTo (const std::string &key) const
 
void BDecayVertex (const Eigen::Vector3d &)
 
const Eigen::Vector3d & BDecayVertex () const
 
void BHadronPdg (const int)
 
int BHadronPdg () const
 
virtual void setTagLikelihood (const std::vector< double > &)
 Return and set methods for the likelihood. More...
 
virtual void setTagLikelihood (std::vector< double > &&)
 to set the tag likelihood for one tagger More...
 
virtual const std::vector< double > & tagLikelihood (void) const
 returns the tag likelihood of one tagger More...
 
virtual void setWeight (double weight)
 set the weight for one tagger More...
 
virtual double weight () const
 get the weight of one tagger More...
 
virtual void makeValid ()
 sets the isValid flag to true, cannot be reversed! More...
 
virtual bool isValid () const
 returns true if the tag was successfull More...
 
virtual TagInfoType infoType (void) const
 returns the infoType of the info objects. More...
 

Protected Member Functions

void setValid (bool valid)
 
void setTagJetInfoType (const TagInfoType &type)
 

Protected Attributes

bool m_isValid
 true if the tagger could tag the jet, default is false More...
 
std::vector< double > m_tagLikelihood
 vector to hold the taglikelihood (signal plus N background) More...
 
double m_weight
 weight for this tag More...
 
TagInfoType m_tagJetInfoType
 string to hold the info type (specified by the tag tool) More...
 

Private Attributes

std::string m_jetTruthLabel
 
double m_distanceToBQuark
 
double m_distanceToCQuark
 
double m_distanceToTLepton
 
Eigen::Vector3d m_BHadronDecayVertex
 
int m_BHadronPdg
 

Detailed Description

Class TruthInfo: Class to store more truth information about a JetTag (e.g.

jet truth labeling)

Definition at line 18 of file TruthInfo.h.

Constructor & Destructor Documentation

◆ TruthInfo() [1/3]

Analysis::TruthInfo::TruthInfo ( )

default constructor

Default constructor.

Definition at line 13 of file TruthInfo.cxx.

14  : BaseTagInfo(),
15  m_jetTruthLabel("N/A"),
16  m_distanceToBQuark (999.),
17  m_distanceToCQuark (999.),
18  m_distanceToTLepton (999.),
19  m_BHadronPdg (0)
20 {}

◆ TruthInfo() [2/3]

Analysis::TruthInfo::TruthInfo ( const TagInfoType x)

constructor with info type

Definition at line 23 of file TruthInfo.cxx.

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

◆ TruthInfo() [3/3]

Analysis::TruthInfo::TruthInfo ( const TruthInfo TruthInfo)

copy destructor

Copy constructor not really needed now, but the object might get more complicated ...

Definition at line 35 of file TruthInfo.cxx.

35  : BaseTagInfo(rhs),
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 {}

◆ ~TruthInfo()

Analysis::TruthInfo::~TruthInfo ( )
virtual

default destructor

Default destructor.

Definition at line 60 of file TruthInfo.cxx.

61 {}

Member Function Documentation

◆ BDecayVertex() [1/2]

const Eigen::Vector3d & Analysis::TruthInfo::BDecayVertex ( ) const
inline

Definition at line 70 of file TruthInfo.h.

70 {return m_BHadronDecayVertex;}

◆ BDecayVertex() [2/2]

void Analysis::TruthInfo::BDecayVertex ( const Eigen::Vector3d &  rp)
inline

Definition at line 69 of file TruthInfo.h.

◆ BHadronPdg() [1/2]

int Analysis::TruthInfo::BHadronPdg ( ) const
inline

Definition at line 72 of file TruthInfo.h.

72 {return m_BHadronPdg;}

◆ BHadronPdg() [2/2]

void Analysis::TruthInfo::BHadronPdg ( const int  i)
inline

Definition at line 71 of file TruthInfo.h.

71 {m_BHadronPdg = i;}

◆ clone()

TruthInfo * Analysis::TruthInfo::clone ( ) const
inlinevirtual

clone method

Reimplemented from Analysis::BaseTagInfo.

Definition at line 74 of file TruthInfo.h.

75 {
76  return new TruthInfo(*this);
77 }

◆ deltaRMinTo() [1/2]

double Analysis::TruthInfo::deltaRMinTo ( const std::string &  key) const

Definition at line 69 of file TruthInfo.cxx.

69  {
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 }

◆ deltaRMinTo() [2/2]

void Analysis::TruthInfo::deltaRMinTo ( const std::string &  key,
double  dR 
)

min deltaR to quarks:

Definition at line 63 of file TruthInfo.cxx.

63  {
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 }

◆ infoType()

TagInfoType Analysis::BaseTagInfo::infoType ( void  ) const
inlinevirtualinherited

returns the infoType of the info objects.

This has to be set by the tagger.

Implements Analysis::ITagInfo.

Definition at line 89 of file BaseTagInfo.h.

90 {
91  m_tagLikelihood=std::move(tagLikelihood);
92 }

◆ isValid()

bool Analysis::BaseTagInfo::isValid ( ) const
inlinevirtualinherited

returns true if the tag was successfull

Implements Analysis::ITagInfo.

Definition at line 81 of file BaseTagInfo.h.

82 {
83  return m_tagJetInfoType;
84 }

◆ jetTruthLabel()

const std::string & Analysis::TruthInfo::jetTruthLabel ( ) const
inline

return the truth label

Definition at line 79 of file TruthInfo.h.

80 {
81  return m_jetTruthLabel;
82 }

◆ makeValid()

void Analysis::BaseTagInfo::makeValid ( )
inlinevirtualinherited

sets the isValid flag to true, cannot be reversed!

Implements Analysis::ITagInfo.

Definition at line 85 of file BaseTagInfo.h.

86 {
88 }

◆ operator=()

TruthInfo & Analysis::TruthInfo::operator= ( const TruthInfo rhs)

assigenment operator

Definition at line 45 of file TruthInfo.cxx.

46 {
47  if (this!=&rhs)
48  {
49  m_jetTruthLabel=rhs.m_jetTruthLabel;
50  m_distanceToBQuark=rhs.m_distanceToBQuark;
51  m_distanceToCQuark=rhs.m_distanceToCQuark;
52  m_distanceToTLepton=rhs.m_distanceToTLepton;
53  m_BHadronDecayVertex=rhs.m_BHadronDecayVertex;
54  m_BHadronPdg=rhs.m_BHadronPdg;
55  }
56  return *this;
57 }

◆ setJetTruthLabel()

void Analysis::TruthInfo::setJetTruthLabel ( const std::string &  jetTruthLabel)
inline

set the truth label The string with which to set the truth label is stored in the JetTruthMatch algtool itself.

It is passed into the info object by the BTagTool after a successful truth match (otherwise it stays at the default value of "N/A"). The truth label string itself has to be passed into the JetTruthMatch algtool via jobOptions. For the JetTruthMatch algtool instance used by the BTagTool this is set to "b" (and the pdg reference list is set to all b particles).

Definition at line 84 of file TruthInfo.h.

85 {
87 }

◆ setTagJetInfoType()

void Analysis::BaseTagInfo::setTagJetInfoType ( const TagInfoType type)
inlineprotectedinherited

Definition at line 129 of file BaseTagInfo.h.

◆ setTagLikelihood() [1/2]

void Analysis::BaseTagInfo::setTagLikelihood ( const std::vector< double > &  tagLikelihood)
inlinevirtualinherited

Return and set methods for the likelihood.

to set the tag likelihood for one tagger

Implements Analysis::ITagInfo.

Definition at line 93 of file BaseTagInfo.h.

94 {
95  // in principal the caller has to check if the vector has a length
96  // -> no checking for the size as in the case of lhSig(void)

◆ setTagLikelihood() [2/2]

void Analysis::BaseTagInfo::setTagLikelihood ( std::vector< double > &&  tagLikelihood)
inlinevirtualinherited

to set the tag likelihood for one tagger

Implements Analysis::ITagInfo.

Definition at line 97 of file BaseTagInfo.h.

◆ setValid()

void Analysis::BaseTagInfo::setValid ( bool  valid)
inlineprotectedinherited

Definition at line 125 of file BaseTagInfo.h.

◆ setWeight()

void Analysis::BaseTagInfo::setWeight ( double  weight)
inlinevirtualinherited

set the weight for one tagger

Implements Analysis::ITagInfo.

Definition at line 113 of file BaseTagInfo.h.

114 {
115  return new BaseTagInfo(*this);
116 }

◆ tagLikelihood()

const std::vector< double > & Analysis::BaseTagInfo::tagLikelihood ( void  ) const
inlinevirtualinherited

returns the tag likelihood of one tagger

Implements Analysis::ITagInfo.

Definition at line 101 of file BaseTagInfo.h.

106 {

◆ weight()

double Analysis::BaseTagInfo::weight ( ) const
inlinevirtualinherited

get the weight of one tagger

Implements Analysis::ITagInfo.

Definition at line 117 of file BaseTagInfo.h.

118 {
119  m_isValid = valid;
120 }

Member Data Documentation

◆ m_BHadronDecayVertex

Eigen::Vector3d Analysis::TruthInfo::m_BHadronDecayVertex
private

Definition at line 65 of file TruthInfo.h.

◆ m_BHadronPdg

int Analysis::TruthInfo::m_BHadronPdg
private

Definition at line 66 of file TruthInfo.h.

◆ m_distanceToBQuark

double Analysis::TruthInfo::m_distanceToBQuark
private

Definition at line 62 of file TruthInfo.h.

◆ m_distanceToCQuark

double Analysis::TruthInfo::m_distanceToCQuark
private

Definition at line 63 of file TruthInfo.h.

◆ m_distanceToTLepton

double Analysis::TruthInfo::m_distanceToTLepton
private

Definition at line 64 of file TruthInfo.h.

◆ m_isValid

bool Analysis::BaseTagInfo::m_isValid
protectedinherited

true if the tagger could tag the jet, default is false

Definition at line 74 of file BaseTagInfo.h.

◆ m_jetTruthLabel

std::string Analysis::TruthInfo::m_jetTruthLabel
private

Definition at line 61 of file TruthInfo.h.

◆ m_tagJetInfoType

TagInfoType Analysis::BaseTagInfo::m_tagJetInfoType
protectedinherited

string to hold the info type (specified by the tag tool)

Definition at line 77 of file BaseTagInfo.h.

◆ m_tagLikelihood

std::vector<double> Analysis::BaseTagInfo::m_tagLikelihood
protectedinherited

vector to hold the taglikelihood (signal plus N background)

Definition at line 75 of file BaseTagInfo.h.

◆ m_weight

double Analysis::BaseTagInfo::m_weight
protectedinherited

weight for this tag

Definition at line 76 of file BaseTagInfo.h.


The documentation for this class was generated from the following files:
Analysis::BaseTagInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition: BaseTagInfo.h:75
Analysis::BaseTagInfo::m_isValid
bool m_isValid
true if the tagger could tag the jet, default is false
Definition: BaseTagInfo.h:74
Analysis::BaseTagInfo::tagLikelihood
virtual const std::vector< double > & tagLikelihood(void) const
returns the tag likelihood of one tagger
Definition: BaseTagInfo.h:101
calibdata.valid
list valid
Definition: calibdata.py:45
Analysis::TruthInfo::m_distanceToBQuark
double m_distanceToBQuark
Definition: TruthInfo.h:62
lumiFormat.i
int i
Definition: lumiFormat.py:92
Analysis::TruthInfo::m_jetTruthLabel
std::string m_jetTruthLabel
Definition: TruthInfo.h:61
Analysis::BaseTagInfo::BaseTagInfo
BaseTagInfo()
default constructor
Definition: BaseTagInfo.cxx:29
Analysis::TruthInfo::m_distanceToTLepton
double m_distanceToTLepton
Definition: TruthInfo.h:64
Analysis::TruthInfo::jetTruthLabel
const std::string & jetTruthLabel() const
return the truth label
Definition: TruthInfo.h:79
Analysis::TruthInfo::TruthInfo
TruthInfo()
default constructor
Definition: TruthInfo.cxx:13
Analysis::BaseTagInfo::m_tagJetInfoType
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition: BaseTagInfo.h:77
rp
ReadCards * rp
Definition: IReadCards.cxx:26
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