ATLAS Offline Software
IPInfoBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 #include "GaudiKernel/MsgStream.h"
8 #include <math.h>
9 #include <iostream>
10 #include <vector>
11 
12 namespace Analysis {
13 
15  IPInfoBase::IPInfoBase() : BaseTagInfo(), m_ntrk(0) {
16  m_tagLikelihood.clear();
17  }
18 
20  IPInfoBase::IPInfoBase(const TagInfoType& tagJetInfoType) : BaseTagInfo(tagJetInfoType), m_ntrk(0) {
21  m_tagLikelihood.clear();
22  }
23 
27  IPInfoBase::IPInfoBase(const IPInfoBase& rhs) : BaseTagInfo(rhs), m_ntrk(rhs.m_ntrk) {
28  }
29 
32  {
33  if (this!=&rhs)
34  {
37  m_ntrk=rhs.m_ntrk;
38  }
39  return *this;
40  }
41 
44  }
45 
47  MsgStream& operator<<( MsgStream& out, const IPInfoBase& info) {
48  double pb = info.tagLikelihood()[0];
49  double pu = info.tagLikelihood()[1];
50  double ww = log(pb/pu);
51  out << " - Tag type " << info.infoType()
52  << " : P(b)= " << pb << " P(u)= " << pu << " W= " << ww
53  << " based on " << info.nbTracks() << " tracks." << endmsg;
54  return out;
55  }
56 
58  std::ostream& operator<<( std::ostream& out, const IPInfoBase& info) {
59  double pb = info.tagLikelihood()[0];
60  double pu = info.tagLikelihood()[1];
61  double ww = log(pb/pu);
62  out << " - Tag type " << info.infoType()
63  << " : P(b)= " << pb << " P(u)= " << pu << " W= " << ww
64  << " based on " << info.nbTracks() << " tracks." << std::endl;
65  return out;
66  }
67 
68 }
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
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
Analysis::IPInfoBase::~IPInfoBase
virtual ~IPInfoBase()
default destructor
Definition: IPInfoBase.cxx:43
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Analysis::IPInfoBase::IPInfoBase
IPInfoBase()
default constructor
Definition: IPInfoBase.cxx:15
Analysis::IPInfoBase::operator=
IPInfoBase & operator=(const IPInfoBase &rhs)
assigenment operator
Definition: IPInfoBase.cxx:31
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::IPInfoBase::m_ntrk
int m_ntrk
Definition: IPInfoBase.h:43
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
IPInfoBase.h
Analysis::IPInfoBase
Definition: IPInfoBase.h:21
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
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