ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCalib
MdtCalib
MdtCalibUtils
src
SimplePatternSelector.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MdtCalibUtils/SimplePatternSelector.h
"
6
7
#include <iostream>
8
9
#include "
AthenaKernel/getMessageSvc.h
"
10
#include "GaudiKernel/MsgStream.h"
11
#include "
MuonCalibEventBase/MuonCalibPattern.h
"
12
13
namespace
MuonCalib
{
14
15
SimplePatternSelector::SimplePatternSelector
(
double
chi2_max,
unsigned
int
mdtSeg_min,
unsigned
int
/*phiSeg_min*/
)
16
17
:
18
m_chi2_max
(chi2_max),
m_mdtSeg_min
(mdtSeg_min) {
19
m_printLevel
= 0;
20
MsgStream log(
Athena::getMessageSvc
(),
"SimplePatternSelector"
);
21
if
(log.level() <= MSG::VERBOSE) {
22
log << MSG::VERBOSE <<
"SimplePatternSelector::SimplePatternSelector"
<<
endmsg
;
23
log << MSG::VERBOSE <<
"New SimplePatternSelector : "
<<
endmsg
;
24
log << MSG::VERBOSE <<
" chi2 cut "
<<
m_chi2_max
<<
endmsg
;
25
log << MSG::VERBOSE <<
" muon seg cut "
<<
m_mdtSeg_min
<<
endmsg
;
26
}
27
}
28
29
bool
SimplePatternSelector::select
(
const
MuonCalibPattern
& pattern)
const
{
30
MsgStream log(
Athena::getMessageSvc
(),
"SimplePatternSelector"
);
31
if
(log.level() <= MSG::VERBOSE) log << MSG::VERBOSE <<
"SimplePatternSelector::select"
<<
endmsg
;
32
33
// test if pattern satisfies the selectors selection criteria
34
35
// test chi2
36
if
(pattern.chi2() >
m_chi2_max
)
return
false
;
37
38
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"pattern passed chi2 cut "
<< pattern.chi2() <<
endmsg
;
39
40
// test total numbers of mdt segments on pattern
41
if
(pattern.muonSegments() <
m_mdtSeg_min
)
return
false
;
42
43
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"pattern passed muon segments cut "
<< pattern.muonSegments() <<
endmsg
;
44
45
return
true
;
46
}
47
48
}
// namespace MuonCalib
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MuonCalibPattern.h
SimplePatternSelector.h
MuonCalib::MuonCalibPattern
Class to store the information belonging to a global pattern in the muon system.
Definition
MuonCalibPattern.h:42
MuonCalib::SimplePatternSelector::m_printLevel
int m_printLevel
print level
Definition
SimplePatternSelector.h:54
MuonCalib::SimplePatternSelector::SimplePatternSelector
SimplePatternSelector(double chi2_max, unsigned int mdtSeg_min, unsigned int phiSeg_min)
constructor
Definition
SimplePatternSelector.cxx:15
MuonCalib::SimplePatternSelector::select
virtual bool select(const MuonCalibPattern &seg) const
test MdtSegment on selection criteria
Definition
SimplePatternSelector.cxx:29
MuonCalib::SimplePatternSelector::m_mdtSeg_min
unsigned int m_mdtSeg_min
minimum number of mdt segments on pattern
Definition
SimplePatternSelector.h:51
MuonCalib::SimplePatternSelector::m_chi2_max
double m_chi2_max
selection criteria
Definition
SimplePatternSelector.h:50
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition
CscCalcPed.cxx:21
Generated on
for ATLAS Offline Software by
1.17.0