ATLAS Offline Software
Loading...
Searching...
No Matches
SMTrackInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7#include <iostream>
8
9namespace Analysis {
10
17
19 const Muon* mu,
20 double d0val,
21 double pTrel,
22 const std::vector<double>& tagLikelihood) {
24 if( link.toContainedElement(*coll, const_cast<Muon*>(mu)) ) {
25 m_muon = link;
26 }
27 m_valD0wrtPV = d0val;
28 m_pTrel = pTrel;
30}
31
33 double d0val,
34 double pTrel,
35 std::vector<double>&& tagLikelihood)
36 : m_muon (muonLink),
37 m_valD0wrtPV (d0val),
38 m_pTrel (pTrel),
40{
41}
42
43const Muon* SMTrackInfo::muon() const {
44 if( m_muon.isValid() ) {
45 return *(m_muon);
46 } else {
47 return 0;
48 }
49}
50
51MsgStream& operator<<( MsgStream& out, const SMTrackInfo& info) {
52 const Muon* tp = info.muon();
53 double phi = 0.;
54 double ipt = 0.;
55 double cth = 0.;
56 if(tp) {
57 phi = tp->phi();
58 ipt = tp->iPt();
59 cth = tp->cotTh();
60 }
61 out << " -> SMTrackInfo "
62 << " d0wrtPV= " << info.d0Value()
63 << " original 1/pt,phi,cotTh = "<<ipt<<" "<<phi<<" "<<cth
64 << " pTrel= " << info.pTrel()
65 << endmsg;
66 return out;
67}
68
69std::ostream& operator<<( std::ostream& out, const SMTrackInfo& info) {
70 const Muon* tp = info.muon();
71 double phi = 0.;
72 double ipt = 0.;
73 double cth = 0.;
74 if(tp) {
75 phi = tp->phi();
76 ipt = tp->iPt();
77 cth = tp->cotTh();
78 }
79 out << " -> SMTrackInfo "
80 << " d0wrtPV= " << info.d0Value()
81 << " original 1/pt,phi,cotTh = "<<ipt<<" "<<phi<<" "<<cth
82 << " pTrel= " << info.pTrel()
83 << std::endl;
84 return out;
85}
86
87}
Scalar phi() const
phi method
#define endmsg
definition of StoreGate container holding a vector of Analysis::Muon
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition SMTrackInfo.h:38
const std::vector< double > & tagLikelihood() const
Definition SMTrackInfo.h:33
const ElementLink< MuonContainer > & muonLink() const
Definition SMTrackInfo.h:30
double pTrel() const
Definition SMTrackInfo.h:32
const Muon * muon() const
ElementLink< MuonContainer > m_muon
Definition SMTrackInfo.h:35
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
STL namespace.