ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::SVInfoPlus Class Reference

#include <SVInfoPlus.h>

Inheritance diagram for Analysis::SVInfoPlus:
Collaboration diagram for Analysis::SVInfoPlus:

Public Member Functions

 SVInfoPlus ()
 default constructor
 SVInfoPlus (const TagInfoType &x)
 constructor with info type
 SVInfoPlus (const SVInfoPlus &SVInfoPlus)
 copy destructor
SVInfoPlusoperator= (const SVInfoPlus &rhs)
 assigenment operator
virtual ~SVInfoPlus ()
 default destructor
virtual SVInfoPlusclone () const
 a clone method for the proper workings of the copy constructor
void setRecSvx (const Trk::RecVertex &)
 Set methods.
void setNGTrackInJet (long int)
void setNGTrackInSvx (long int)
void setN2T (long int)
void setMass (float)
void setEnergyFraction (float)
void setNormDist (float)
void addTrackInfo (const SVTrackInfo &i)
const Trk::RecVertexgetRecSvx () const
 Get methods.
long int getNGTrackInJet () const
long int getNGTrackInSvx () const
long int getN2T () const
float getMass () const
float getEnergyFraction () const
float getNormDist () const
float getChi2Compatibility (const Trk::RecVertex priVertex, const Trk::RecVertex secVertex, const Amg::Vector3D jetDirection) const
int numTrackInfo () const
const SVTrackInfogetTrackInfo (uint i) 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

Trk::RecVertex m_recsvx
long int m_NGTinJet
long int m_NGTinSvx
long int m_N2Tpair
float m_masssvx
float m_efracsvx
float m_normdist
std::vector< SVTrackInfom_trackinfo

Detailed Description

Definition at line 16 of file SVInfoPlus.h.

Constructor & Destructor Documentation

◆ SVInfoPlus() [1/3]

Analysis::SVInfoPlus::SVInfoPlus ( )

default constructor

Default constructor.

Definition at line 11 of file SVInfoPlus.cxx.

11 : BaseTagInfo(),
12 m_recsvx(Trk::RecVertex()),
13 m_NGTinJet(-1),
14 m_NGTinSvx(-1),
15 m_N2Tpair(-1),
16 m_masssvx(-1.),
17 m_efracsvx(-1.),
18 m_normdist(-1.),
19 m_trackinfo(std::vector<SVTrackInfo>()) {}
BaseTagInfo()
default constructor
std::vector< SVTrackInfo > m_trackinfo
Definition SVInfoPlus.h:64
Trk::RecVertex m_recsvx
Definition SVInfoPlus.h:57

◆ SVInfoPlus() [2/3]

Analysis::SVInfoPlus::SVInfoPlus ( const TagInfoType & x)

constructor with info type

Definition at line 22 of file SVInfoPlus.cxx.

22 : BaseTagInfo(tagJetInfoType),
23 m_recsvx(Trk::RecVertex()),
24 m_NGTinJet(-1),
25 m_NGTinSvx(-1),
26 m_N2Tpair(-1),
27 m_masssvx(-1.),
28 m_efracsvx(-1.),
29 m_normdist(-1.),
30 m_trackinfo(std::vector<SVTrackInfo>())
31{
32 m_tagLikelihood.clear();
33}
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition BaseTagInfo.h:67

◆ SVInfoPlus() [3/3]

Analysis::SVInfoPlus::SVInfoPlus ( const SVInfoPlus & SVInfoPlus)

copy destructor

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

Definition at line 38 of file SVInfoPlus.cxx.

38 : BaseTagInfo(rhs),
39 m_recsvx(rhs.m_recsvx),
40 m_NGTinJet(rhs.m_NGTinJet),
41 m_NGTinSvx(rhs.m_NGTinSvx),
42 m_N2Tpair(rhs.m_N2Tpair),
43 m_masssvx(rhs.m_masssvx),
44 m_efracsvx(rhs.m_efracsvx),
45 m_normdist(rhs.m_normdist),
46 m_trackinfo(rhs.m_trackinfo)
47{}

◆ ~SVInfoPlus()

Analysis::SVInfoPlus::~SVInfoPlus ( )
virtual

default destructor

Default destructor.

Definition at line 69 of file SVInfoPlus.cxx.

70{}

Member Function Documentation

◆ addTrackInfo()

void Analysis::SVInfoPlus::addTrackInfo ( const SVTrackInfo & i)
inline

Definition at line 75 of file SVInfoPlus.h.

75{ m_trackinfo.push_back(i); }

◆ clone()

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

a clone method for the proper workings of the copy constructor

Reimplemented from Analysis::BaseTagInfo.

Definition at line 87 of file SVInfoPlus.h.

88{
89 return new SVInfoPlus(*this);
90}
SVInfoPlus()
default constructor

◆ getChi2Compatibility()

float Analysis::SVInfoPlus::getChi2Compatibility ( const Trk::RecVertex priVertex,
const Trk::RecVertex secVertex,
const Amg::Vector3D jetDirection ) const

Definition at line 72 of file SVInfoPlus.cxx.

72 {
73 // calculates the chi2 compatibility between the primary and secondary vertex.
74 // this used to be the default tag weight until January 2010.
75
76 Eigen::Vector3d Diff;
77 Diff[0]=secVertex.position().x()-priVertex.position().x();
78 Diff[1]=secVertex.position().y()-priVertex.position().y();
79 Diff[2]=secVertex.position().z()-priVertex.position().z();
80
81 AmgSymMatrix(3) covariance = secVertex.covariancePosition() + priVertex.covariancePosition();
82
83 Eigen::Matrix3d weight;
84 bool invertible;
85 covariance.computeInverseWithCheck(weight, invertible);
86 if (not invertible) {
87 return 0;
88 }
89
90 Amg::Vector3D differenceNorm(Diff);
91 differenceNorm.normalize();
92 Amg::Vector3D jetDirectionNorm(jetDirection);
93 jetDirectionNorm.normalize();
94
95 double weight_similarity = Diff.transpose()*weight*Diff;
96
97 return std::sqrt(weight_similarity)*differenceNorm.dot(jetDirectionNorm);
98
99
100 }
#define AmgSymMatrix(dim)
if(febId1==febId2)
virtual double weight() const
get the weight of one tagger
const Amg::Vector3D & position() const
return position of vertex
Definition Vertex.cxx:63
Eigen::Matrix< double, 3, 1 > Vector3D

◆ getEnergyFraction()

float Analysis::SVInfoPlus::getEnergyFraction ( ) const
inline

Definition at line 82 of file SVInfoPlus.h.

82{return m_efracsvx;}

◆ getMass()

float Analysis::SVInfoPlus::getMass ( ) const
inline

Definition at line 81 of file SVInfoPlus.h.

81{return m_masssvx;}

◆ getN2T()

long int Analysis::SVInfoPlus::getN2T ( ) const
inline

Definition at line 80 of file SVInfoPlus.h.

80{return m_N2Tpair;}

◆ getNGTrackInJet()

long int Analysis::SVInfoPlus::getNGTrackInJet ( ) const
inline

Definition at line 78 of file SVInfoPlus.h.

78{return m_NGTinJet;}

◆ getNGTrackInSvx()

long int Analysis::SVInfoPlus::getNGTrackInSvx ( ) const
inline

Definition at line 79 of file SVInfoPlus.h.

79{return m_NGTinSvx;}

◆ getNormDist()

float Analysis::SVInfoPlus::getNormDist ( ) const
inline

Definition at line 83 of file SVInfoPlus.h.

83{return m_normdist;}

◆ getRecSvx()

const Trk::RecVertex & Analysis::SVInfoPlus::getRecSvx ( ) const
inline

Get methods.

Definition at line 77 of file SVInfoPlus.h.

77{return m_recsvx;}

◆ getTrackInfo()

const SVTrackInfo & Analysis::SVInfoPlus::getTrackInfo ( uint i) const
inline

Definition at line 85 of file SVInfoPlus.h.

85{return m_trackinfo.at(i);}

◆ 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

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

◆ numTrackInfo()

int Analysis::SVInfoPlus::numTrackInfo ( ) const
inline

Definition at line 84 of file SVInfoPlus.h.

84{return m_trackinfo.size();}

◆ operator=()

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

assigenment operator

Definition at line 50 of file SVInfoPlus.cxx.

51{
52 if (this!=&rhs)
53 {
54 m_tagLikelihood=rhs.m_tagLikelihood;
55 m_recsvx = rhs.m_recsvx;
56 m_NGTinJet = rhs.m_NGTinJet;
57 m_NGTinSvx = rhs.m_NGTinSvx;
58 m_N2Tpair = rhs.m_N2Tpair;
59 m_masssvx = rhs.m_masssvx;
60 m_efracsvx = rhs.m_efracsvx;
61 m_normdist = rhs.m_normdist;
62 m_trackinfo = rhs.m_trackinfo;
63 m_tagJetInfoType=rhs.m_tagJetInfoType;
64 }
65 return *this;
66}

◆ setEnergyFraction()

void Analysis::SVInfoPlus::setEnergyFraction ( float ef)
inline

◆ setMass()

void Analysis::SVInfoPlus::setMass ( float mass)
inline

◆ setN2T()

void Analysis::SVInfoPlus::setN2T ( long int li)
inline

Definition at line 71 of file SVInfoPlus.h.

71{m_N2Tpair = li;}

◆ setNGTrackInJet()

void Analysis::SVInfoPlus::setNGTrackInJet ( long int li)
inline

Definition at line 69 of file SVInfoPlus.h.

69{m_NGTinJet = li;}

◆ setNGTrackInSvx()

void Analysis::SVInfoPlus::setNGTrackInSvx ( long int li)
inline

Definition at line 70 of file SVInfoPlus.h.

70{m_NGTinSvx = li;}

◆ setNormDist()

void Analysis::SVInfoPlus::setNormDist ( float nd)
inline

Definition at line 74 of file SVInfoPlus.h.

74{m_normdist = nd;}

◆ setRecSvx()

void Analysis::SVInfoPlus::setRecSvx ( const Trk::RecVertex & gl)
inline

Set methods.

Definition at line 68 of file SVInfoPlus.h.

68{m_recsvx = gl;}

◆ 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

◆ 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

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

float Analysis::SVInfoPlus::m_efracsvx
private

Definition at line 62 of file SVInfoPlus.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_masssvx

float Analysis::SVInfoPlus::m_masssvx
private

Definition at line 61 of file SVInfoPlus.h.

◆ m_N2Tpair

long int Analysis::SVInfoPlus::m_N2Tpair
private

Definition at line 60 of file SVInfoPlus.h.

◆ m_NGTinJet

long int Analysis::SVInfoPlus::m_NGTinJet
private

Definition at line 58 of file SVInfoPlus.h.

◆ m_NGTinSvx

long int Analysis::SVInfoPlus::m_NGTinSvx
private

Definition at line 59 of file SVInfoPlus.h.

◆ m_normdist

float Analysis::SVInfoPlus::m_normdist
private

Definition at line 63 of file SVInfoPlus.h.

◆ m_recsvx

Trk::RecVertex Analysis::SVInfoPlus::m_recsvx
private

Definition at line 57 of file SVInfoPlus.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_trackinfo

std::vector<SVTrackInfo> Analysis::SVInfoPlus::m_trackinfo
private

Definition at line 64 of file SVInfoPlus.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: