ATLAS Offline Software
Loading...
Searching...
No Matches
TrkPriVxPurity.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7
8namespace Trk
9{
10 TrkPriVxPurity::TrkPriVxPurity(int ntrk, const std::vector<double>& puWeights,
11 const std::vector<double>& noTruth,
12 int brLinks, const std::vector<double>& inWeights,
13 const std::vector<double>& outWeights):
14 m_fittedTracks(ntrk), m_puWeights(puWeights),
15 m_noTruth(noTruth),m_brokenLinks(brLinks),
16 m_inWeights(inWeights),
17 m_outWeights(outWeights)
18 {}
19
20
21//dump methods
22 MsgStream& TrkPriVxPurity::dump(MsgStream& sl) const
23 {
24 sl<<"***** Primary Vertex Purity Info *****"<<std::endl;
25 sl<<"Total number of fitted tracks "<<m_fittedTracks<<std::endl;
26 sl<<"Number of track with internally broken links "<<m_brokenLinks<<std::endl;
27 if(!m_inWeights.empty())
28 {
29 sl<<"The weights of inlier tracks: ";
30 std::vector<double>::const_iterator i = m_inWeights.begin();
31 for(;i!=m_inWeights.end();++i) sl<<*i<<" ";
32 sl<<std::endl;
33 }
34
35 if(!m_outWeights.empty())
36 {
37 sl<<"The weights of outlier tracks: ";
38 std::vector<double>::const_iterator i = m_outWeights.begin();
39 for(;i!=m_outWeights.end();++i) sl<<*i<<" ";
40 sl<<std::endl;
41 }
42
43 if(!m_puWeights.empty())
44 {
45 sl<<"The weights of tracks from PileUp: ";
46 std::vector<double>::const_iterator i = m_puWeights.begin();
47 for(;i!=m_puWeights.end();++i) sl<<*i<<" ";
48 sl<<std::endl;
49 }
50
51 if(!m_noTruth.empty())
52 {
53 sl<<"The weights of tracks w/o truth matching: ";
54 std::vector<double>::const_iterator i = m_noTruth.begin();
55 for(;i!=m_noTruth.end();++i) sl<<*i<<" ";
56 sl<<std::endl;
57 }
58
59 return sl;
60 }// end of msg stream dump method
61
62 std::ostream& TrkPriVxPurity:: dump(std::ostream& sl) const
63 {
64 sl<<"***** Primary Vertex Purity Info *****"<<std::endl;
65 sl<<"Total number of fitted tracks "<<m_fittedTracks<<std::endl;
66 sl<<"Number of track with internally broken links "<<m_brokenLinks<<std::endl;
67 if(!m_inWeights.empty())
68 {
69 sl<<"The weights of inlier tracks: ";
70 std::vector<double>::const_iterator i = m_inWeights.begin();
71 for(;i!=m_inWeights.end();++i) sl<<*i<<" ";
72 sl<<std::endl;
73 }
74
75 if(!m_outWeights.empty())
76 {
77 sl<<"The weights of outlier tracks: ";
78 std::vector<double>::const_iterator i = m_outWeights.begin();
79 for(;i!=m_outWeights.end();++i) sl<<*i<<" ";
80 sl<<std::endl;
81 }
82
83 if(!m_puWeights.empty())
84 {
85 sl<<"The weights of tracks from PileUp: ";
86 std::vector<double>::const_iterator i = m_puWeights.begin();
87 for(;i!=m_puWeights.end();++i) sl<<*i<<" ";
88 sl<<std::endl;
89 }
90
91 if(!m_noTruth.empty())
92 {
93 sl<<"The weights of tracks w/o truth matching: ";
94 std::vector<double>::const_iterator i = m_noTruth.begin();
95 for(;i!=m_noTruth.end();++i) sl<<*i<<" ";
96 sl<<std::endl;
97 }
98
99 return sl;
100 }//end of ostream dump method
101
102}//end of namespace definitions
std::vector< double > m_outWeights
std::vector< double > m_puWeights
MsgStream & dump(MsgStream &sl) const
Dump info method.
std::vector< double > m_inWeights
std::vector< double > m_noTruth
unsigned int m_fittedTracks
TrkPriVxPurity(int ntrk, const std::vector< double > &puWeights, const std::vector< double > &noTruth, int brLinks, const std::vector< double > &inWeights, const std::vector< double > &outWeights)
Constructor, requiring a number of fitted tracks, wectors of weghts for inlyers, outlyers,...
unsigned int m_brokenLinks
Ensure that the ATLAS eigen extensions are properly loaded.