ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
MuonCalib::SimpleMdtSegmentSelector Class Reference

#include <SimpleMdtSegmentSelector.h>

Inheritance diagram for MuonCalib::SimpleMdtSegmentSelector:
Collaboration diagram for MuonCalib::SimpleMdtSegmentSelector:

Public Member Functions

 SimpleMdtSegmentSelector (double chi2_max, unsigned int hits_min)
 constructor More...
 
virtual bool select (const MuonCalibSegment &seg) const
 test MdtSegment on selection criteria More...
 
void setPrintLevel (int level)
 set print level More...
 

Private Attributes

double m_chi2_max
 selection criteria More...
 
unsigned int m_hits_min
 minimum numbers of hits on segment More...
 
int m_printLevel
 print level More...
 

Detailed Description

Basic MdtSegments selector. Gets MdtSegments and tests if they satisfy the selection criteria:

Returns true if they do.

Author
Niels.nosp@m..Van.nosp@m..Eldi.nosp@m.k@ce.nosp@m.rn.ch

Definition at line 35 of file SimpleMdtSegmentSelector.h.

Constructor & Destructor Documentation

◆ SimpleMdtSegmentSelector()

MuonCalib::SimpleMdtSegmentSelector::SimpleMdtSegmentSelector ( double  chi2_max,
unsigned int  hits_min 
)

constructor

Definition at line 15 of file SimpleMdtSegmentSelector.cxx.

15  :
16  m_chi2_max(chi2_max), m_hits_min(hits_min) {
17  m_printLevel = 0;
18 
19  MsgStream log(Athena::getMessageSvc(), "SimpleMdtSegmentSelector");
20  log << MSG::INFO << "SimpleMdtSegmentSelector::SimpleMdtSegmentSelector" << endmsg;
21  log << MSG::INFO << "New SimpleMdtSegmentSelector : " << endmsg;
22  log << MSG::INFO << " chi2 cut " << m_chi2_max << endmsg;
23  log << MSG::INFO << " hits cut " << m_hits_min << endmsg;
24  }

Member Function Documentation

◆ select()

bool MuonCalib::SimpleMdtSegmentSelector::select ( const MuonCalibSegment seg) const
virtual

test MdtSegment on selection criteria

Implements MuonCalib::IMdtSegmentSelector.

Definition at line 26 of file SimpleMdtSegmentSelector.cxx.

26  {
27  MsgStream log(Athena::getMessageSvc(), "SimpleMdtSegmentSelector");
28  if (log.level() <= MSG::VERBOSE) {
29  log << MSG::VERBOSE << "SimpleMdtSegmentSelector::select" << endmsg;
30  log << MSG::VERBOSE << "Segment: chi2 " << seg.chi2() << " mdtHits " << seg.mdtHitsOnTrack() << " tan "
31  << seg.direction().y() / seg.direction().z() << endmsg;
32  }
33 
34  // test if segments satisfies the selectors selection criteria
35 
36  // test chi2
37  if (seg.chi2() > m_chi2_max) return false;
38 
39  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "segment passed chi2 cut " << seg.chi2() << endmsg;
40 
41  // test total numbers of hits on segment
42  if (seg.mdtHitsOnTrack() < m_hits_min) return false;
43 
44  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "segment passed mdtHits cut " << seg.mdtHitsOnTrack() << endmsg;
45 
46  double tanphi = seg.direction().y() / seg.direction().z();
47  // if( std::abs(tanphi) > 1. ) return false;
48 
49  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "segment passed angular cut " << tanphi << endmsg;
50 
51  return true;
52  }

◆ setPrintLevel()

void MuonCalib::SimpleMdtSegmentSelector::setPrintLevel ( int  level)
inlinevirtual

set print level

Implements MuonCalib::IMdtSegmentSelector.

Definition at line 44 of file SimpleMdtSegmentSelector.h.

44 { m_printLevel = level; }

Member Data Documentation

◆ m_chi2_max

double MuonCalib::SimpleMdtSegmentSelector::m_chi2_max
private

selection criteria

maximum chi2 of segment

Definition at line 48 of file SimpleMdtSegmentSelector.h.

◆ m_hits_min

unsigned int MuonCalib::SimpleMdtSegmentSelector::m_hits_min
private

minimum numbers of hits on segment

Definition at line 49 of file SimpleMdtSegmentSelector.h.

◆ m_printLevel

int MuonCalib::SimpleMdtSegmentSelector::m_printLevel
private

print level

Definition at line 52 of file SimpleMdtSegmentSelector.h.


The documentation for this class was generated from the following files:
MuonCalib::SimpleMdtSegmentSelector::m_printLevel
int m_printLevel
print level
Definition: SimpleMdtSegmentSelector.h:52
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
MuonCalib::SimpleMdtSegmentSelector::m_hits_min
unsigned int m_hits_min
minimum numbers of hits on segment
Definition: SimpleMdtSegmentSelector.h:49
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib::SimpleMdtSegmentSelector::m_chi2_max
double m_chi2_max
selection criteria
Definition: SimpleMdtSegmentSelector.h:48
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