ATLAS Offline Software
Loading...
Searching...
No Matches
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
 TruthInfo (const TagInfoType &x)
 constructor with info type
 TruthInfo (const TruthInfo &TruthInfo)
 copy destructor
TruthInfooperator= (const TruthInfo &rhs)
 assigenment operator
virtual ~TruthInfo ()
 default destructor
virtual TruthInfoclone () const
 clone method
const std::string & jetTruthLabel () const
 return the truth label
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.
void deltaRMinTo (const std::string &key, double dR)
 min deltaR to quarks:
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.
virtual void setTagLikelihood (std::vector< double > &&)
 to set the tag likelihood for one tagger
virtual const std::vector< double > & tagLikelihood (void) const
 returns the tag likelihood of one tagger
virtual void setWeight (double weight)
 set the weight for one tagger
virtual double weight () const
 get the weight of one tagger
virtual void makeValid ()
 sets the isValid flag to true, cannot be reversed!
virtual bool isValid () const
 returns true if the tag was successfull
virtual TagInfoType infoType (void) const
 returns the infoType of the info objects.

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
std::vector< double > m_tagLikelihood
 vector to hold the taglikelihood (signal plus N background)
double m_weight
 weight for this tag
TagInfoType m_tagJetInfoType
 string to hold the info type (specified by the tag tool)

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.),
19 m_BHadronPdg (0)
20{}
BaseTagInfo()
default constructor
double m_distanceToCQuark
Definition TruthInfo.h:63
std::string m_jetTruthLabel
Definition TruthInfo.h:61
double m_distanceToTLepton
Definition TruthInfo.h:64
double m_distanceToBQuark
Definition TruthInfo.h:62

◆ 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.),
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{}
Eigen::Vector3d m_BHadronDecayVertex
Definition TruthInfo.h:65

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

◆ BDecayVertex() [2/2]

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

Definition at line 69 of file TruthInfo.h.

ReadCards * rp

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

◆ 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}
TruthInfo()
default constructor
Definition TruthInfo.cxx:13

◆ 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 81 of file BaseTagInfo.h.

82{
83 return m_tagJetInfoType;
84}
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition BaseTagInfo.h:69

◆ isValid()

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

returns true if the tag was successfull

Implements Analysis::ITagInfo.

Definition at line 73 of file BaseTagInfo.h.

74{
75 return m_isValid;
76}
bool m_isValid
true if the tagger could tag the jet, default is false
Definition BaseTagInfo.h:66

◆ 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 77 of file BaseTagInfo.h.

78{
79 m_isValid = true;
80}

◆ 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}
const std::string & jetTruthLabel() const
return the truth label
Definition TruthInfo.h:79

◆ setTagJetInfoType()

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

Definition at line 121 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 85 of file BaseTagInfo.h.

86{
88}
virtual const std::vector< double > & tagLikelihood(void) const
returns the tag likelihood of one tagger
Definition BaseTagInfo.h:93
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition BaseTagInfo.h:67

◆ 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 89 of file BaseTagInfo.h.

90{
92}

◆ setValid()

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

Definition at line 117 of file BaseTagInfo.h.

118{
120}
list valid
Definition calibdata.py:44

◆ setWeight()

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

set the weight for one tagger

Implements Analysis::ITagInfo.

Definition at line 105 of file BaseTagInfo.h.

106{
108}
double m_weight
weight for this tag
Definition BaseTagInfo.h:68
virtual double weight() const
get the weight of one tagger

◆ tagLikelihood()

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

returns the tag likelihood of 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)
97 return m_tagLikelihood;
98}

◆ weight()

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

get the weight of one tagger

Implements Analysis::ITagInfo.

Definition at line 109 of file BaseTagInfo.h.

110{
111 return (this->isValid() ? m_weight : -19.75);
112}
virtual bool isValid() const
returns true if the tag was successfull
Definition BaseTagInfo.h:73

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 66 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 69 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 67 of file BaseTagInfo.h.

◆ m_weight

double Analysis::BaseTagInfo::m_weight
protectedinherited

weight for this tag

Definition at line 68 of file BaseTagInfo.h.


The documentation for this class was generated from the following files: