ATLAS Offline Software
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 
8 #include "GaudiKernel/MsgStream.h"
9 #include <iostream>
10 #include <vector>
11 
12 namespace Analysis {
13 
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 
27  m_trackinfo(rhs.m_trackinfo) {
28  }
29 
31  if (this!=&rhs) {
34  }
35  return *this;
36  }
37 
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 }
grepfile.info
info
Definition: grepfile.py:38
Analysis::BaseTagInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition: BaseTagInfo.h:75
Analysis::IPInfoPlus::operator=
IPInfoPlus & operator=(const IPInfoPlus &rhs)
Definition: IPInfoPlus.cxx:30
Analysis::IPInfoPlus::~IPInfoPlus
virtual ~IPInfoPlus()
Definition: IPInfoPlus.cxx:38
Analysis::IPInfoPlus
Definition: IPInfoPlus.h:25
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
IPInfoPlus.h
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Analysis::BaseTagInfo
Class BasetagInfo: Implements methods defined in ITagInfo.
Definition: BaseTagInfo.h:40
Analysis::TagInfoType
std::string TagInfoType
Definition: JetTagInfoBase.h:19
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
IPTrackInfo.h
Analysis::IPInfoPlus::IPInfoPlus
IPInfoPlus()
Default constructor.
Definition: IPInfoPlus.cxx:14
Analysis::IPInfoPlus::m_trackinfo
std::vector< IPTrackInfo > m_trackinfo
Definition: IPInfoPlus.h:48
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
Analysis::operator<<
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Definition: IPInfoBase.cxx:47
Analysis::BaseTagInfo::m_tagJetInfoType
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition: BaseTagInfo.h:77
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
Analysis::IPInfoPlus::numTrackInfo
int numTrackInfo() const
Number of track info objects stored.
Definition: IPInfoPlus.h:37
drawFromPickle.view
view
Definition: drawFromPickle.py:294