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

#include <SVInfoPlus.h>

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

Public Member Functions

 SVInfoPlus ()
 default constructor More...
 
 SVInfoPlus (const TagInfoType &x)
 constructor with info type More...
 
 SVInfoPlus (const SVInfoPlus &SVInfoPlus)
 copy destructor More...
 
SVInfoPlusoperator= (const SVInfoPlus &rhs)
 assigenment operator More...
 
virtual ~SVInfoPlus ()
 default destructor More...
 
virtual SVInfoPlusclone () const
 a clone method for the proper workings of the copy constructor More...
 
void setRecSvx (const Trk::RecVertex &)
 Set methods. More...
 
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. More...
 
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. 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

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(),
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>()) {}

◆ SVInfoPlus() [2/3]

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

constructor with info type

Definition at line 22 of file SVInfoPlus.cxx.

22  : BaseTagInfo(tagJetInfoType),
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 }

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

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

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

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

◆ 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

Definition at line 73 of file SVInfoPlus.h.

73 {m_efracsvx = ef;}

◆ setMass()

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

Definition at line 72 of file SVInfoPlus.h.

72 {m_masssvx = mass;}

◆ 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 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_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 74 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 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_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 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
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
Analysis::BaseTagInfo::weight
virtual double weight() const
get the weight of one tagger
Definition: BaseTagInfo.h:117
Analysis::BaseTagInfo::m_isValid
bool m_isValid
true if the tagger could tag the jet, default is false
Definition: BaseTagInfo.h:74
Analysis::SVInfoPlus::m_trackinfo
std::vector< SVTrackInfo > m_trackinfo
Definition: SVInfoPlus.h:64
Analysis::SVInfoPlus::m_masssvx
float m_masssvx
Definition: SVInfoPlus.h:61
Analysis::SVInfoPlus::m_recsvx
Trk::RecVertex m_recsvx
Definition: SVInfoPlus.h:57
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
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::SVInfoPlus::SVInfoPlus
SVInfoPlus()
default constructor
Definition: SVInfoPlus.cxx:11
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::Vertex::position
const Amg::Vector3D & position() const
return position of vertex
Definition: Vertex.cxx:72
Analysis::SVInfoPlus::m_normdist
float m_normdist
Definition: SVInfoPlus.h:63
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Analysis::BaseTagInfo::BaseTagInfo
BaseTagInfo()
default constructor
Definition: BaseTagInfo.cxx:29
Analysis::SVInfoPlus::m_NGTinJet
long int m_NGTinJet
Definition: SVInfoPlus.h:58
Analysis::BaseTagInfo::m_tagJetInfoType
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition: BaseTagInfo.h:77
Analysis::SVInfoPlus::m_efracsvx
float m_efracsvx
Definition: SVInfoPlus.h:62
Analysis::SVInfoPlus::m_NGTinSvx
long int m_NGTinSvx
Definition: SVInfoPlus.h:59
Analysis::SVInfoPlus::m_N2Tpair
long int m_N2Tpair
Definition: SVInfoPlus.h:60
LheEventFiller_Common.ef
ef
Definition: SFGen_i/share/common/LheEventFiller_Common.py:7