ATLAS Offline Software
Loading...
Searching...
No Matches
IPTrackInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
8#include "GaudiKernel/MsgStream.h"
9#include <iostream>
10
11namespace Analysis {
12
14 m_track(ElementLink<Rec::TrackParticleContainer>()),
16 m_isFromV0(false),
17 m_valD0wrtPV(0),
18 m_sigD0wrtPV(0),
19 m_valZ0wrtPV(0),
20 m_sigZ0wrtPV(0),
25{
26}
27
29 const Rec::TrackParticle* trk,
30 const TrackGrade& grade,
31 bool isFromV0,
32 double d0val, double d0sig,
33 double z0val, double z0sig)
34 : m_trackWeight2D(0),
38{
40 if( link.toContainedElement(*coll, const_cast<Rec::TrackParticle*>(trk)) ) {
41 m_track = link;
42 }
43 m_trackGrade = grade;
45 m_valD0wrtPV = d0val;
46 m_sigD0wrtPV = d0sig;
47 m_valZ0wrtPV = z0val;
48 m_sigZ0wrtPV = z0sig;
49}
50
52 const TrackGrade& grade,
53 bool isFromV0,
54 double d0val, double d0sig,
55 double z0val, double z0sig)
56 : m_track (track),
57 m_trackGrade (grade),
59 m_valD0wrtPV (d0val),
60 m_sigD0wrtPV (d0sig),
61 m_valZ0wrtPV (z0val),
62 m_sigZ0wrtPV (z0sig),
67{
68}
69
71 if( m_track.isValid() ) {
72 return *(m_track);
73 } else {
74 return 0;
75 }
76}
77
78MsgStream& operator<<( MsgStream& out, const IPTrackInfo& info) {
79 const Rec::TrackParticle* tp = info.track();
80 double phi = 0.;
81 double d0 = 0.;
82 double pt = 0.;
83 double eta = 0.;
84 if(tp) {
85 phi = tp->measuredPerigee()->parameters()[Trk::phi];
86 d0 = tp->measuredPerigee()->parameters()[Trk::d0];
87 pt = tp->pt();
88 eta = tp->eta();
89 }
90 out << " -> IPTrackInfo "
91 << " grade= " << info.trackGrade().gradeString()
92 << " fromV0= " << info.isFromV0()
93 << " d0wrtPV= " << info.d0Value() << " S=" << info.d0Significance()
94 << " z0wrtPV= " << info.z0Value() << " S=" << info.z0Significance()
95 << " original pt,eta,phi,d0 = "<<pt<<" "<<eta<<" "<<phi<<" "<<d0
96 << " weight2D= " << info.trackWeight2D()
97 << " weight3D= " << info.trackWeight3D()
98 << " probJP= " << info.trackProbJP()
99 << " probJPneg= " << info.trackProbJPneg()
100 << endmsg;
101 return out;
102}
103
104std::ostream& operator<<( std::ostream& out, const IPTrackInfo& info) {
105 const Rec::TrackParticle* tp = info.track();
106 double phi = 0.;
107 double d0 = 0.;
108 double pt = 0.;
109 double eta = 0.;
110 if(tp) {
111 phi = tp->measuredPerigee()->parameters()[Trk::phi];
112 d0 = tp->measuredPerigee()->parameters()[Trk::d0];
113 pt = tp->pt();
114 eta = tp->eta();
115 }
116 out << " -> IPTrackInfo "
117 << " grade= " << info.trackGrade().gradeString()
118 << " fromV0= " << info.isFromV0()
119 << " d0wrtPV= " << info.d0Value() << " S=" << info.d0Significance()
120 << " z0wrtPV= " << info.z0Value() << " S=" << info.z0Significance()
121 << " original pt,eta,phi,d0 = "<<pt<<" "<<eta<<" "<<phi<<" "<<d0
122 << " weight2D= " << info.trackWeight2D()
123 << " weight3D= " << info.trackWeight3D()
124 << " probJP= " << info.trackProbJP()
125 << " probJPneg= " << info.trackProbJPneg()
126 << std::endl;
127 return out;
128}
129
130}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
ElementLink< Rec::TrackParticleContainer > m_track
Definition IPTrackInfo.h:51
const Rec::TrackParticle * track() const
TrackGrade m_trackGrade
Definition IPTrackInfo.h:52
bool isFromV0() const
Definition IPTrackInfo.h:40
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Gaudi Tools.
@ phi
Definition ParamDefs.h:75
@ d0
Definition ParamDefs.h:63