ATLAS Offline Software
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 
9 namespace Analysis {
10 
12  : m_muon(ElementLink<MuonContainer>()),
13  m_valD0wrtPV(0),
14  m_pTrel(0)
15 {
16 }
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),
39  m_tagLikelihood (std::move (tagLikelihood))
40 {
41 }
42 
43 const Muon* SMTrackInfo::muon() const {
44  if( m_muon.isValid() ) {
45  return *(m_muon);
46  } else {
47  return 0;
48  }
49 }
50 
51 MsgStream& 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 
69 std::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 }
grepfile.info
info
Definition: grepfile.py:38
SMTrackInfo.h
Analysis::SMTrackInfo::m_pTrel
double m_pTrel
Definition: SMTrackInfo.h:37
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Analysis::SMTrackInfo::m_valD0wrtPV
double m_valD0wrtPV
Definition: SMTrackInfo.h:36
Analysis::SMTrackInfo::pTrel
double pTrel() const
Definition: SMTrackInfo.h:32
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Analysis::SMTrackInfo::SMTrackInfo
SMTrackInfo()
Definition: SMTrackInfo.cxx:11
Analysis::SMTrackInfo::muon
const Muon * muon() const
Definition: SMTrackInfo.cxx:43
Analysis::MuonContainer
definition of StoreGate container holding a vector of Analysis::Muon
Definition: Reconstruction/MuonIdentification/muonEvent/muonEvent/MuonContainer.h:38
Analysis::SMTrackInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition: SMTrackInfo.h:38
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::SMTrackInfo::m_muon
ElementLink< MuonContainer > m_muon
Definition: SMTrackInfo.h:35
Analysis::operator<<
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Definition: IPInfoBase.cxx:47
Analysis::SMTrackInfo::tagLikelihood
const std::vector< double > & tagLikelihood() const
Definition: SMTrackInfo.h:33
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Analysis::SMTrackInfo
Definition: SMTrackInfo.h:17