ATLAS Offline Software
Loading...
Searching...
No Matches
MuonOverlapDescriptor.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8#include <utility>
9
10#include "GaudiKernel/MsgStream.h"
11
12Rec::MuonOverlapDescriptor::MuonOverlapDescriptor(bool SharesIDTrack, bool SharesSpectroTrack, unsigned int SharedPrecisionHits,
13 unsigned int TotalPrecisionHits, unsigned int SharedSpectroPhiHits,
14 unsigned int TotalSpectroPhiHits, std::set<Identifier> msIntersection)
15
16 :
17 m_sharesIndetTrack(SharesIDTrack),
18 m_sharesSpectroTrack(SharesSpectroTrack),
19 m_sharedPrecisionHits(SharedPrecisionHits),
20 m_totalPrecisionHits(TotalPrecisionHits),
21 m_sharedSpectroPhiHits(SharedSpectroPhiHits),
22 m_totalSpectroPhiHits(TotalSpectroPhiHits),
23 m_intersection(std::move(msIntersection)) {}
24
34
43
46
59
61bool Rec::MuonOverlapDescriptor::hasOverlap(unsigned int toleratedSharedhits) const {
63
64 nSharedPrecisionHits() > toleratedSharedhits ||
65
66 nSharedSpectroPhiHits() > toleratedSharedhits;
67}
68
70MsgStream& Rec::operator<<(MsgStream& sl, const MuonOverlapDescriptor& itself)
71// if namespace, need to use MsgStream& Rec::operator :-(
72{
73 if (itself.hasOverlap()) {
74 sl << "Muon overlap desriptor: " << endmsg;
75 sl << "ID pointers: " << (itself.sharesIndetTrack() ? "identical" : "different")
76 << ", MS pointers: " << (itself.sharesSpectroTrack() ? "identical" : "different") << endmsg;
77 sl << "MS hits: " << itself.nSharedPrecisionHits() << " shared prec. hits of " << itself.nTotalPrecisionHits() << " total."
78 << endmsg;
79 sl << " " << itself.nSharedSpectroPhiHits() << " shared phi hits of " << itself.nTotalSpectroPhiHits() << " totoal."
80 << endmsg;
81 } else
82 sl << "Muon overlap desriptor: no Overlap." << endmsg;
83 return sl;
84}
85
87std::ostream& Rec::operator<<(std::ostream& sl, const MuonOverlapDescriptor& itself)
88// if namespace, need to use MsgStream& Rec::operator :-(
89{
90 if (itself.hasOverlap()) {
91 sl << "Muon overlap desriptor: " << std::endl;
92 sl << "ID pointers: " << (itself.sharesIndetTrack() ? "identical" : "different")
93 << ", MS pointers: " << (itself.sharesSpectroTrack() ? "identical" : "different") << std::endl;
94 sl << "MS hits: " << itself.nSharedPrecisionHits() << " shared prec. hits of " << itself.nTotalPrecisionHits() << " total."
95 << std::endl;
96 sl << " " << itself.nSharedSpectroPhiHits() << " shared phi hits of " << itself.nTotalSpectroPhiHits() << " totoal."
97 << std::endl;
98 } else
99 sl << "Muon overlap desriptor: no Overlap." << std::endl;
100
101 return sl;
102}
#define endmsg
A class describing ID, MS and hit overlaps, mind this class is TRANSIENT ONLY.
bool sharesIndetTrack() const
Access if the overlap consists of sharing the ID track.
bool sharesSpectroTrack() const
Access if the overlap consists of sharing the MS track.
MuonOverlapDescriptor(bool SharesIDTrack, bool SharesSpectroTrack, unsigned int SharedPrecisionHits, unsigned int TotalPrecisionHits, unsigned int SharedSpectroPhiHits, unsigned int TotalSpectroPhiHits, std::set< Identifier > ms_intersection)
full constructor with some overlap information
MuonOverlapDescriptor & operator=(const MuonOverlapDescriptor &)
assignment operator
std::set< Identifier > m_intersection
unsigned int nSharedSpectroPhiHits() const
Tell if there are shared MS phi shared hits.
bool hasOverlap(unsigned int tolaratedSharedHits=0) const
summary method
unsigned int nTotalSpectroPhiHits() const
Total MS phi hits to compare to.
MuonOverlapDescriptor()
default constructor
unsigned int nSharedPrecisionHits() const
Tell if there are shared MS precision shared hits.
unsigned int nTotalPrecisionHits() const
Total MS precision hits to compare to.
~MuonOverlapDescriptor()
destructor
MsgStream & operator<<(MsgStream &sl, const MuonOverlapDescriptor &des)
Overload of << operator for MsgStream for debug output.
STL namespace.