ATLAS Offline Software
SoftMuon.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
4 
6 
7 #include "TopEvent/EventTools.h"
8 
9 namespace top {
10  SoftMuon::SoftMuon(const double ptcut) :
11  m_ptcut(ptcut),
12  m_softmuonSelectionTool("SoftMuonSelectionTool") {
13  top::check(m_softmuonSelectionTool.retrieve(), "Failed to retrieve softmuonSelectionTool");
14  }
15 
16  bool SoftMuon::passSelection(const xAOD::Muon& mu) const {
17  if (mu.pt() < m_ptcut) return false;
18 
19  if (!m_softmuonSelectionTool->accept(mu)) return false;
20 
21  return true;
22  }
23 
24  void SoftMuon::print(std::ostream& os) const {
25  os << "SoftMuon\n"
26  << " * pT > " << m_ptcut << "\n"
27  << " * Everything else from muon tool - fill this in?\n";
28  }
29 }
top::SoftMuon::passSelection
virtual bool passSelection(const xAOD::Muon &mu) const override
Implements the logic to select good muons.
Definition: SoftMuon.cxx:16
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::SoftMuon::m_ptcut
double m_ptcut
Definition: SoftMuon.h:44
Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.ptcut
float ptcut
Definition: Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.py:9
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
SoftMuon.h
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::SoftMuon::m_softmuonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_softmuonSelectionTool
Definition: SoftMuon.h:47
top::SoftMuon::SoftMuon
SoftMuon(const double ptcut)
Construct the tool to select good muons.
Definition: SoftMuon.cxx:10
top::SoftMuon::print
virtual void print(std::ostream &os) const override
Because everybody likes to know what object definitions they ran with.
Definition: SoftMuon.cxx:24
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53