ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace Analysis {
13
19
20 IPInfoPlus::IPInfoPlus(const TagInfoType& tagJetInfoType) :
21 BaseTagInfo(tagJetInfoType),
22 m_trackinfo() {
23 m_tagLikelihood.clear();
24 }
25
29
31 if (this!=&rhs) {
34 }
35 return *this;
36 }
37
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}
#define endmsg
TagInfoType m_tagJetInfoType
string to hold the info type (specified by the tag tool)
Definition BaseTagInfo.h:69
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition BaseTagInfo.h:67
BaseTagInfo()
default constructor
This class contains additional information for tags based on impact parameter, like pointers to the T...
Definition IPInfoPlus.h:25
void updateTrackWeight(const Rec::TrackParticle *trk, const std::string &view, double w)
Update the track weights for a trackparticle.
int numTrackInfo() const
Number of track info objects stored.
Definition IPInfoPlus.h:37
std::vector< IPTrackInfo > m_trackinfo
Definition IPInfoPlus.h:48
IPInfoPlus & operator=(const IPInfoPlus &rhs)
IPInfoPlus()
Default constructor.
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
std::string TagInfoType