ATLAS Offline Software
Loading...
Searching...
No Matches
SETrackInfo.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 Electron* mu,
20 double d0val,
21 double pTrel,
22 const std::vector<double>& tagLikelihood) {
24 if( link.toContainedElement(*coll, const_cast<Electron*>(mu)) ) {
25 m_electron = link;
26 }
27 m_valD0wrtPV = d0val;
28 m_pTrel = pTrel;
30}
31
33 const Photon* mu,
34 double d0val,
35 double pTrel,
36 const std::vector<double>& tagLikelihood) {
38 if( link.toContainedElement(*coll, const_cast<Photon*>(mu)) ) {
39 m_photon = link;
40 }
41 m_valD0wrtPV = d0val;
42 m_pTrel = pTrel;
44}
45
47 double d0val,
48 double pTrel,
49 std::vector<double>&& tagLikelihood)
50 : m_electron (eleLink),
51 m_valD0wrtPV (d0val),
52 m_pTrel (pTrel),
54 {
55}
56
58 double d0val,
59 double pTrel,
60 std::vector<double>&& tagLikelihood)
61 : m_photon (gamLink),
62 m_valD0wrtPV (d0val),
63 m_pTrel (pTrel),
65 {
66}
67
69 if( m_electron.isValid() ) {
70 return *(m_electron);
71 } else if ( m_photon.isValid() ) {
72 return *(m_photon);
73 } else {
74 return 0;
75 }
76}
77
79 if ( m_photon.isValid() ) return true;
80 return false;
81}
82
83MsgStream& operator<<( MsgStream& out, const SETrackInfo& info) {
84 const egamma* tp = info.electron();
85 double phi = 0.;
86 double ipt = 0.;
87 double cth = 0.;
88 if(tp) {
89 phi = tp->phi();
90 ipt = tp->iPt();
91 cth = tp->cotTh();
92 }
93 out << " -> SETrackInfo "
94 << " isPhoton = " << info.isPhoton()
95 << " d0wrtPV= " << info.d0Value()
96 << " original 1/pt,phi,cotTh = "<<ipt<<" "<<phi<<" "<<cth
97 << " pTrel= " << info.pTrel()
98 << endmsg;
99 return out;
100}
101
102std::ostream& operator<<( std::ostream& out, const SETrackInfo& info) {
103 const egamma* tp = info.electron();
104 double phi = 0.;
105 double ipt = 0.;
106 double cth = 0.;
107 if(tp) {
108 phi = tp->phi();
109 ipt = tp->iPt();
110 cth = tp->cotTh();
111 }
112 out << " -> SETrackInfo "
113 << " isPhoton = " << info.isPhoton()
114 << " d0wrtPV= " << info.d0Value()
115 << " original 1/pt,phi,cotTh = "<<ipt<<" "<<phi<<" "<<cth
116 << " pTrel= " << info.pTrel()
117 << std::endl;
118 return out;
119}
120
121}
Scalar phi() const
phi method
#define endmsg
const egamma * electron() const
const std::vector< double > & tagLikelihood() const
Definition SETrackInfo.h:45
ElementLink< PhotonContainer > m_photon
Definition SETrackInfo.h:50
double pTrel() const
Definition SETrackInfo.h:44
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition SETrackInfo.h:53
ElementLink< ElectronContainer > m_electron
Definition SETrackInfo.h:49
elec/gamma data class.
Definition egamma.h:58
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
STL namespace.