ATLAS Offline Software
TrigL2HitResidual.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/MsgStream.h"
6 #include "Identifier/Identifier.h"
7 
8 inline TrigL2HitResidual::TrigL2HitResidual(Identifier id, Region reg,
9  double phiR, double phiP) :
10  m_id(id), m_region(reg), m_phiRes(phiR), m_phiPull(phiP) {
11 
12  m_etaRes=0.0;m_etaPull=0.0;
13 }
14 
15 inline TrigL2HitResidual::TrigL2HitResidual(Identifier id, Region reg,
16  double phiR, double phiP,
17  double etaR, double etaP) :
18  m_id(id), m_region(reg), m_phiRes(phiR), m_phiPull(phiP), m_etaRes(etaR), m_etaPull(etaP) {
19 
20 }
21 
22 inline double TrigL2HitResidual::phiResidual() const {
23  return m_phiRes;
24 }
25 
26 inline double TrigL2HitResidual::etaResidual() const {
27  return m_etaRes;
28 }
29 
30 inline double TrigL2HitResidual::phiPull() const {
31  return m_phiPull;
32 }
33 
34 inline double TrigL2HitResidual::etaPull() const {
35  return m_etaPull;
36 }
37 
38 inline Identifier TrigL2HitResidual::identify() const {
39  return m_id;
40 }
41 
42 inline Region TrigL2HitResidual::regionId() const {
43  return m_region;
44 }
45 
46 inline std::string str( const TrigL2HitResidual& v ) {
47 
48  std::stringstream ss;
49  ss << "Residual: region "<< static_cast<std::uint8_t>(v.regionId())
50  <<" phi: "<<v.phiResidual()
51  <<" / "<<v.phiPull()
52  <<" eta: "<<v.etaResidual()
53  <<" / "<<v.etaPull();
54  return ss.str();
55 }
56 
57 inline MsgStream& operator<< ( MsgStream& m, const TrigL2HitResidual& v ) {
58  m << str(v);
59  return m;
60 }