ATLAS Offline Software
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 
11  : m_nscatterers(0)
12  , m_npseudoMeasurements(0)
13 {}
14 
16 
17 unsigned 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 =
25  m_chamberHitSummary.end();
26  for (; it != it_end; ++it)
27  count += it->netaHits();
28  return count;
29 }
30 
31 unsigned 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 =
38  m_chamberHitSummary.end();
39  for (; it != it_end; ++it)
40  count += it->nphiHits();
41  return count;
42 }
43 
44 unsigned 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 =
51  m_chamberHitSummary.end();
52  for (; it != it_end; ++it)
53  count += it->nholes();
54  return count;
55 }
56 
57 unsigned 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 =
64  m_chamberHitSummary.end();
65  for (; it != it_end; ++it)
66  count += it->noutliers();
67  return count;
68 }
69 
70 unsigned 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 =
77  m_chamberHitSummary.end();
78  for (; it != it_end; ++it)
79  count += it->ncloseHits();
80  return count;
81 }
82 
83 std::ostream&
84 Trk::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) {
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 
112 MsgStream&
113 Trk::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 }
Trk::MuonTrackSummary::ChamberHitSummary::phiProjection
const Projection & phiProjection() const
access to the data of the phi projection, users have to check whether this is NOT a MDT chamber first...
Definition: MuonTrackSummary.h:106
MuonTrackSummary.h
Trk::MuonTrackSummary::ChamberHitSummary::chamberId
const Identifier & chamberId() const
returns the chamber identifier
Definition: MuonTrackSummary.h:58
Trk::MuonTrackSummary::ChamberHitSummary::isMdt
bool isMdt() const
returns whether this is a MDT chamber
Definition: MuonTrackSummary.h:61
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Trk::MuonTrackSummary::nscatterers
unsigned int nscatterers() const
number of scattering centres on the track
Definition: MuonTrackSummary.h:142
Trk::MuonTrackSummary::netaHits
unsigned int netaHits() const
number of eta hits on the track
Definition: MuonTrackSummary.cxx:18
Trk::MuonTrackSummary::ChamberHitSummary::Projection::nhits
int nhits
Definition: MuonTrackSummary.h:40
Trk::MuonTrackSummary::ChamberHitSummary::Projection::nholes
int nholes
Definition: MuonTrackSummary.h:41
Trk::MuonTrackSummary::ChamberHitSummary::Projection::ncloseHits
int ncloseHits
Definition: MuonTrackSummary.h:44
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
Trk::MuonTrackSummary::ChamberHitSummary
structure to hold information per chamber in the muon system
Definition: MuonTrackSummary.h:32
Trk::MuonTrackSummary::chamberHitSummary
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
Definition: MuonTrackSummary.h:148
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::MuonTrackSummary::ChamberHitSummary::Projection::ndeltas
int ndeltas
Definition: MuonTrackSummary.h:43
Trk::MuonTrackSummary::ChamberHitSummary::Projection::noutliers
int noutliers
Definition: MuonTrackSummary.h:42
Trk::MuonTrackSummary::nholes
unsigned int nholes() const
number of holes on the track
Definition: MuonTrackSummary.cxx:45
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
Trk::MuonTrackSummary::~MuonTrackSummary
~MuonTrackSummary()
destructor
Trk::MuonTrackSummary::ChamberHitSummary::etaProjection
const Projection & etaProjection() const
access to the data of the eta projection, users have to check whether this is NOT a MDT chamber first...
Definition: MuonTrackSummary.h:103
Trk::MuonTrackSummary::MuonTrackSummary
MuonTrackSummary()
default constructor
Definition: MuonTrackSummary.cxx:10
Trk::MuonTrackSummary::nphiHits
unsigned int nphiHits() const
number of phi hits on the track
Definition: MuonTrackSummary.cxx:32
Trk::MuonTrackSummary::noutliers
unsigned int noutliers() const
number of eta trigger hits on the track
Definition: MuonTrackSummary.cxx:58
Trk::MuonTrackSummary::ncloseHits
unsigned int ncloseHits() const
number of holes on the track
Definition: MuonTrackSummary.cxx:71
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::MuonTrackSummary::ChamberHitSummary::Projection
structure to hold the information for the eta/phi projection of RPC, TGC and CSC chambers and per mul...
Definition: MuonTrackSummary.h:38
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Trk::MuonTrackSummary::npseudoMeasurements
unsigned int npseudoMeasurements() const
number of pseudo measurements on the track
Definition: MuonTrackSummary.h:145