ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
top::AntiMuon Class Reference

Select muons based on some early suggestions. More...

#include <AntiMuon.h>

Inheritance diagram for top::AntiMuon:
Collaboration diagram for top::AntiMuon:

Public Member Functions

 AntiMuon (const double ptcut, AntiMuonIsolation *isolation)
 Construct the tool to select good muons. More...
 
virtual ~AntiMuon ()
 Does nothing. More...
 
virtual bool passSelection (const xAOD::Muon &mu) const override
 Implements the logic to select good muons. More...
 
virtual bool passSelectionLoose (const xAOD::Muon &mu) const override
 The loose selection needed by some background estimates. More...
 
virtual void print (std::ostream &os) const override
 Print the cuts to the ostream. More...
 

Protected Attributes

double m_ptcut
 Lower pT threshold to apply to object selection. More...
 
ToolHandle< CP::IMuonSelectionToolm_muonSelectionTool
 Proper tool to select muons. More...
 
std::unique_ptr< top::AntiMuonIsolationm_isolation
 Isolation tool, can be nullptr meaning "no isolation requirement". More...
 

Detailed Description

Select muons based on some early suggestions.

Definition at line 18 of file AntiMuon.h.

Constructor & Destructor Documentation

◆ AntiMuon()

top::AntiMuon::AntiMuon ( const double  ptcut,
AntiMuonIsolation isolation 
)

Construct the tool to select good muons.

Parameters
ptcutThe minimum pT cut for good muons.
isolationThe isolation the user wants to apply. Don't want any isolation to be applied? Then leave this as a nullptr.

Definition at line 10 of file AntiMuon.cxx.

10  :
11  m_ptcut(ptcut),
12  m_muonSelectionTool("MuonSelectionTool"),
13  m_isolation(isolation) {
14  top::check(m_muonSelectionTool.retrieve(), "Failed to retrieve muonSelectionTool");
15  }

◆ ~AntiMuon()

virtual top::AntiMuon::~AntiMuon ( )
inlinevirtual

Does nothing.

Definition at line 30 of file AntiMuon.h.

30 {}

Member Function Documentation

◆ passSelection()

bool top::AntiMuon::passSelection ( const xAOD::Muon mu) const
overridevirtual

Implements the logic to select good muons.

Parameters
muThe muon that we want to check.
Returns
True if the muon is good, false otherwise.

Implements top::MuonSelectionBase.

Definition at line 17 of file AntiMuon.cxx.

17  {
18  if (mu.pt() < m_ptcut) return false;
19 
20  if (!m_muonSelectionTool->accept(mu)) return false;
21 
22  return m_isolation->passSelection(mu);
23  }

◆ passSelectionLoose()

bool top::AntiMuon::passSelectionLoose ( const xAOD::Muon mu) const
overridevirtual

The loose selection needed by some background estimates.

Parameters
mu
Returns

Implements top::MuonSelectionBase.

Definition at line 25 of file AntiMuon.cxx.

25  {
26  // code does not compile without this function
27 
28  return true;
29  }

◆ print()

void top::AntiMuon::print ( std::ostream &  os) const
overridevirtual

Print the cuts to the ostream.

Implements top::MuonSelectionBase.

Definition at line 31 of file AntiMuon.cxx.

31  {
32  os << "AntiMuon\n"
33  << " * pT > " << m_ptcut << "\n"
34  << " * Everything else from muon tool - fill this in?\n";
35 
36  if (!m_isolation)
37  os << " * No isolation requirement\n";
38  else
39  m_isolation->print(os);
40  }

Member Data Documentation

◆ m_isolation

std::unique_ptr<top::AntiMuonIsolation> top::AntiMuon::m_isolation
protected

Isolation tool, can be nullptr meaning "no isolation requirement".

Definition at line 58 of file AntiMuon.h.

◆ m_muonSelectionTool

ToolHandle<CP::IMuonSelectionTool> top::AntiMuon::m_muonSelectionTool
protected

Proper tool to select muons.

Definition at line 55 of file AntiMuon.h.

◆ m_ptcut

double top::AntiMuon::m_ptcut
protected

Lower pT threshold to apply to object selection.

Definition at line 52 of file AntiMuon.h.


The documentation for this class was generated from the following files:
top::AntiMuon::m_ptcut
double m_ptcut
Lower pT threshold to apply to object selection.
Definition: AntiMuon.h:52
top::AntiMuon::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Proper tool to select muons.
Definition: AntiMuon.h:55
Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.ptcut
float ptcut
Definition: Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.py:9
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
top::AntiMuon::m_isolation
std::unique_ptr< top::AntiMuonIsolation > m_isolation
Isolation tool, can be nullptr meaning "no isolation requirement".
Definition: AntiMuon.h:58
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53