ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7#include <iostream>
8
10#include "GaudiKernel/MsgStream.h"
12
13namespace 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
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
#define endmsg
Class to store the information belonging to a global pattern in the muon system.
SimplePatternSelector(double chi2_max, unsigned int mdtSeg_min, unsigned int phiSeg_min)
constructor
virtual bool select(const MuonCalibPattern &seg) const
test MdtSegment on selection criteria
unsigned int m_mdtSeg_min
minimum number of mdt segments on pattern
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.