ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfo
src
IPInfoPlus.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
JetTagInfo/IPInfoPlus.h
"
7
#include "
JetTagInfo/IPTrackInfo.h
"
8
#include "GaudiKernel/MsgStream.h"
9
#include <iostream>
10
#include <vector>
11
12
namespace
Analysis
{
13
14
IPInfoPlus::IPInfoPlus
() :
15
BaseTagInfo
(),
16
m_trackinfo
() {
17
m_tagLikelihood
.clear();
18
}
19
20
IPInfoPlus::IPInfoPlus
(
const
TagInfoType
& tagJetInfoType) :
21
BaseTagInfo
(tagJetInfoType),
22
m_trackinfo
() {
23
m_tagLikelihood
.clear();
24
}
25
26
IPInfoPlus::IPInfoPlus
(
const
IPInfoPlus
& rhs) :
BaseTagInfo
(rhs),
27
m_trackinfo
(rhs.
m_trackinfo
) {
28
}
29
30
IPInfoPlus
&
IPInfoPlus::operator=
(
const
IPInfoPlus
& rhs) {
31
if
(
this
!=&rhs) {
32
m_trackinfo
=rhs.
m_trackinfo
;
33
m_tagJetInfoType
=rhs.
m_tagJetInfoType
;
34
}
35
return
*
this
;
36
}
37
38
IPInfoPlus::~IPInfoPlus
() {
39
}
40
41
void
IPInfoPlus::updateTrackWeight
(
const
Rec::TrackParticle
* trk,
const
std::string& view,
double
w) {
42
if
(!trk)
return
;
43
for
(
int
i=0;i<this->
numTrackInfo
();i++) {
44
if
( trk==
m_trackinfo
.at(i).track() ) {
45
if
(view==
"2D"
)
m_trackinfo
.at(i).setTrackWeight2D(w);
46
if
(view==
"3D"
)
m_trackinfo
.at(i).setTrackWeight3D(w);
47
if
(view==
"JP"
)
m_trackinfo
.at(i).setTrackProbJP(w);
48
if
(view==
"JPneg"
)
m_trackinfo
.at(i).setTrackProbJPneg(w);
49
break
;
50
}
51
}
52
}
53
54
MsgStream&
operator<<
( MsgStream& out,
const
IPInfoPlus
& info) {
55
int
ntrk = info.numTrackInfo();
56
out <<
" - Tag type "
<< info.infoType()
57
<<
" based on "
<< ntrk <<
" tracks:"
<<
endmsg
;
58
for
(
int
i=0;i<ntrk;i++) {
59
out <<
" -> "
<< i << info.getTrackInfo(i) <<
endmsg
;
60
}
61
return
out;
62
}
63
64
std::ostream&
operator<<
( std::ostream& out,
const
IPInfoPlus
& info) {
65
int
ntrk = info.numTrackInfo();
66
out <<
" - Tag type "
<< info.infoType()
67
<<
" based on "
<< ntrk <<
" tracks:"
<< std::endl;
68
for
(
int
i=0;i<ntrk;i++) {
69
out <<
" -> "
<< info.getTrackInfo(i) << std::endl;
70
}
71
return
out;
72
}
73
74
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
IPInfoPlus.h
IPTrackInfo.h
Analysis::BaseTagInfo::BaseTagInfo
BaseTagInfo()=default
Analysis::BaseTagInfo::m_tagJetInfoType
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition
BaseTagInfo.h:63
Analysis::BaseTagInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition
BaseTagInfo.h:61
Analysis::IPInfoPlus
This class contains additional information for tags based on impact parameter, like pointers to the T...
Definition
IPInfoPlus.h:25
Analysis::IPInfoPlus::updateTrackWeight
void updateTrackWeight(const Rec::TrackParticle *trk, const std::string &view, double w)
Update the track weights for a trackparticle.
Definition
IPInfoPlus.cxx:41
Analysis::IPInfoPlus::numTrackInfo
int numTrackInfo() const
Number of track info objects stored.
Definition
IPInfoPlus.h:37
Analysis::IPInfoPlus::m_trackinfo
std::vector< IPTrackInfo > m_trackinfo
Definition
IPInfoPlus.h:48
Analysis::IPInfoPlus::~IPInfoPlus
virtual ~IPInfoPlus()
Definition
IPInfoPlus.cxx:38
Analysis::IPInfoPlus::operator=
IPInfoPlus & operator=(const IPInfoPlus &rhs)
Definition
IPInfoPlus.cxx:30
Analysis::IPInfoPlus::IPInfoPlus
IPInfoPlus()
Default constructor.
Definition
IPInfoPlus.cxx:14
Rec::TrackParticle
Definition
Reconstruction/Particle/Particle/TrackParticle.h:47
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Analysis::operator<<
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Definition
IPInfoBase.cxx:47
Analysis::TagInfoType
std::string TagInfoType
Definition
JetTagInfoBase.h:19
Generated on
for ATLAS Offline Software by
1.17.0