ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackSummary.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "GaudiKernel/MsgStream.h"
8#include <iostream>
9
14
16
17unsigned int
19{
20
21 unsigned int count = 0;
22 std::vector<ChamberHitSummary>::const_iterator it =
23 m_chamberHitSummary.begin();
24 std::vector<ChamberHitSummary>::const_iterator it_end =
26 for (; it != it_end; ++it)
27 count += it->netaHits();
28 return count;
29}
30
31unsigned int
33{
34 unsigned int count = 0;
35 std::vector<ChamberHitSummary>::const_iterator it =
36 m_chamberHitSummary.begin();
37 std::vector<ChamberHitSummary>::const_iterator it_end =
39 for (; it != it_end; ++it)
40 count += it->nphiHits();
41 return count;
42}
43
44unsigned int
46{
47 unsigned int count = 0;
48 std::vector<ChamberHitSummary>::const_iterator it =
49 m_chamberHitSummary.begin();
50 std::vector<ChamberHitSummary>::const_iterator it_end =
52 for (; it != it_end; ++it)
53 count += it->nholes();
54 return count;
55}
56
57unsigned int
59{
60 unsigned int count = 0;
61 std::vector<ChamberHitSummary>::const_iterator it =
62 m_chamberHitSummary.begin();
63 std::vector<ChamberHitSummary>::const_iterator it_end =
65 for (; it != it_end; ++it)
66 count += it->noutliers();
67 return count;
68}
69
70unsigned int
72{
73 unsigned int count = 0;
74 std::vector<ChamberHitSummary>::const_iterator it =
75 m_chamberHitSummary.begin();
76 std::vector<ChamberHitSummary>::const_iterator it_end =
78 for (; it != it_end; ++it)
79 count += it->ncloseHits();
80 return count;
81}
82
83std::ostream&
84Trk::operator<<(std::ostream& out, const MuonTrackSummary& trackSum)
85{
86 out << "MuonTrackSummary: npseudo " << trackSum.npseudoMeasurements()
87 << " nscat " << trackSum.nscatterers() << " number of chambers "
88 << trackSum.chamberHitSummary().size() << std::endl;
89 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it =
90 trackSum.chamberHitSummary().begin();
91 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it_end =
92 trackSum.chamberHitSummary().end();
93
94 for (; it != it_end; ++it) {
95 const MuonTrackSummary::ChamberHitSummary& chSum = *it;
97 chSum.etaProjection();
99 chSum.phiProjection();
100 out << " Chamber " << chSum.chamberId() << " isMdt " << chSum.isMdt()
101 << std::endl
102 << " First projection: Hits " << etaP.nhits << " holes " << etaP.nholes
103 << " outlier " << etaP.noutliers << " deltas " << etaP.ndeltas
104 << " close Hits " << etaP.ncloseHits << std::endl
105 << " Second projection: Hits " << phiP.nhits << " holes " << phiP.nholes
106 << " outlier " << phiP.noutliers << " deltas " << phiP.ndeltas
107 << " close Hits " << phiP.ncloseHits << std::endl;
108 }
109 return out;
110}
111
112MsgStream&
113Trk::operator<<(MsgStream& out, const MuonTrackSummary& trackSum)
114{
115 out << "MuonTrackSummary: Hits: eta " << trackSum.netaHits() << " phi "
116 << trackSum.nphiHits() << " holes " << trackSum.nholes() << " outliers "
117 << trackSum.noutliers() << " close hits " << trackSum.ncloseHits()
118 << endmsg;
119 if (out.level() <= MSG::VERBOSE) {
120 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it =
121 trackSum.chamberHitSummary().begin();
122 std::vector<MuonTrackSummary::ChamberHitSummary>::const_iterator it_end =
123 trackSum.chamberHitSummary().end();
124 for (; it != it_end; ++it) {
125 const MuonTrackSummary::ChamberHitSummary& chSum = *it;
127 chSum.etaProjection();
129 chSum.phiProjection();
130 out << " Chamber " << chSum.chamberId() << " isMdt " << chSum.isMdt()
131 << std::endl
132 << " First projection: Hits " << etaP.nhits << " holes "
133 << etaP.nholes << " outlier " << etaP.noutliers << " deltas "
134 << etaP.ndeltas << " close Hits " << etaP.ncloseHits << std::endl
135 << " Second projection: Hits " << phiP.nhits << " holes "
136 << phiP.nholes << " outlier " << phiP.noutliers << " deltas "
137 << phiP.ndeltas << " close Hits " << phiP.ncloseHits << std::endl;
138 }
139 }
140 return out;
141}
#define endmsg
Detailed track summary for the muon system Give access to hit counts per chamber.
std::vector< ChamberHitSummary > m_chamberHitSummary
~MuonTrackSummary()
destructor
MuonTrackSummary()
default constructor
unsigned int nscatterers() const
number of scattering centres on the track
unsigned int npseudoMeasurements() const
number of pseudo measurements on the track
unsigned int netaHits() const
number of eta hits on the track
unsigned int ncloseHits() const
number of holes on the track
unsigned int m_npseudoMeasurements
unsigned int nphiHits() const
number of phi hits on the track
unsigned int noutliers() const
number of eta trigger hits on the track
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
unsigned int nholes() const
number of holes on the track
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
structure to hold the information for the eta/phi projection of RPC, TGC and CSC chambers and per mul...
structure to hold information per chamber in the muon system
const Projection & phiProjection() const
access to the data of the phi projection, users have to check whether this is NOT a MDT chamber first...
const Projection & etaProjection() const
access to the data of the eta projection, users have to check whether this is NOT a MDT chamber first...
const Identifier & chamberId() const
returns the chamber identifier
bool isMdt() const
returns whether this is a MDT chamber