ATLAS Offline Software
Loading...
Searching...
No Matches
MuonQualityWord.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 Reconstruction/MuonIdentification/muonEvent/MuonQualityWord.h
7 Author: Ketevi A. Assamagan, July 2009
8 Transienti class to hold muon quality bits and the methods to manipulate it
9 so as to return the the isLoose, isMedium and isTight to the use.
10 This object is not persistified.
11 ---------------------------------------------------------------------------
12 ***************************************************************************/
13
15#include "GaudiKernel/MsgStream.h"
16
21
24
25= default;
26
28
29
32 if ( this != &rhs ) {
34 }
35 return *this;
36}
37
39MsgStream& operator << ( MsgStream& sl, const MuonQualityWord& qword)
40// if namespace, need to use MsgStream& Rec::operator :-(
41{
42 sl <<"Muon quality word: "<<qword.qualityWord()<< " [";
43 for( int index =15 ; index >= 0 ; index--){
44 if (index==12 || index==8 || index==4) {
45 if( qword.qualityWord() & (1<<index) ) sl << " 1 ][" ;
46 else sl << " 0 ][" ;
47 } else if (index==0) {
48 if( qword.qualityWord() & (1<<index) ) sl << " 1 ]" ;
49 else sl << " 0 ]" ;
50 } else {
51 if( qword.qualityWord() & (1<<index) ) sl << " 1" ;
52 else sl << " 0" ;
53 }
54 }
55 sl << endmsg;
56 return sl;
57}
58
60std::ostream& operator << ( std::ostream& sl, const MuonQualityWord& qword)
61// if namespace, need to use MsgStream& Rec::operator :-(
62{
63 sl <<"Muon quality word: "<<qword.qualityWord()<< " [";
64 for( int index =15 ; index >= 0 ; index--){
65 if (index==12 || index==8 || index==4) {
66 if( qword.qualityWord() & (1<<index) ) sl << " 1 ][" ;
67 else sl << " 0 ][" ;
68 } else if (index==0) {
69 if( qword.qualityWord() & (1<<index) ) sl << " 1 ]" ;
70 else sl << " 0 ]" ;
71 } else {
72 if( qword.qualityWord() & (1<<index) ) sl << " 1" ;
73 else sl << " 0" ;
74 }
75 }
76 sl << std::endl;
77 return sl;
78}
#define endmsg
MsgStream & operator<<(MsgStream &sl, const MuonQualityWord &qword)
MsgStream output.
A bitted word defining different levels of muon identification qualities (in terms of purity and effi...
MuonQualityWord(uint16_t qualityWord)
full constructor with a quality word
MuonQualityWord()
default constructor
MuonQualityWord & operator=(const MuonQualityWord &)
assignment operator
uint16_t qualityWord() const
get back the quality word
Definition index.py:1