ATLAS Offline Software
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
mergePhysValFiles.pattern
pattern
Definition:
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
MuonCalibPattern.h
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
MuonCalib::SimplePatternSelector::SimplePatternSelector
SimplePatternSelector(double chi2_max, unsigned int mdtSeg_min, unsigned int phiSeg_min)
constructor
Definition:
SimplePatternSelector.cxx:15
MuonCalib::SimplePatternSelector::m_mdtSeg_min
unsigned int m_mdtSeg_min
minimum number of mdt segments on pattern
Definition:
SimplePatternSelector.h:51
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition:
getMessageSvc.cxx:20
MuonCalib::SimplePatternSelector::m_chi2_max
double m_chi2_max
selection criteria
Definition:
SimplePatternSelector.h:50
MuonCalib::SimplePatternSelector::select
virtual bool select(const MuonCalibPattern &seg) const
test MdtSegment on selection criteria
Definition:
SimplePatternSelector.cxx:29
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition:
CscCalcPed.cxx:22
MuonCalib::SimplePatternSelector::m_printLevel
int m_printLevel
print level
Definition:
SimplePatternSelector.h:54
SimplePatternSelector.h
MuonCalib::MuonCalibPattern
Definition:
MuonCalibPattern.h:42
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
python.Constants.VERBOSE
int VERBOSE
Definition:
Control/AthenaCommon/python/Constants.py:14
Generated on Thu Jul 4 2024 21:26:59 for ATLAS Offline Software by
1.8.18