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

To select taus based on BoostedDecisionTree definition. More...

#include <Tau.h>

Inheritance diagram for top::Tau:
Collaboration diagram for top::Tau:

Public Member Functions

 Tau ()
 
virtual ~Tau ()
 
bool passSelection (const xAOD::TauJet &tau) const override
 Selection for the main analysis (i.e. More...
 
bool passSelectionLoose (const xAOD::TauJet &tau) const override
 Selection for the "loose" object definitions (e.g. More...
 
void print (std::ostream &os) const override
 Why would you not want to know what you're running? More...
 

Protected Attributes

ToolHandle< TauAnalysisTools::TauSelectionToolm_tauSelection
 
ToolHandle< TauAnalysisTools::TauSelectionToolm_tauSelectionLoose
 

Detailed Description

To select taus based on BoostedDecisionTree definition.

Definition at line 19 of file Tau.h.

Constructor & Destructor Documentation

◆ Tau()

top::Tau::Tau ( )

Definition at line 9 of file Tau.cxx.

9  : m_tauSelection("TauAnalysisTools::TauSelectionTool"),
11  ("TauAnalysisTools::TauSelectionToolLoose") {
12  top::check(m_tauSelection.retrieve(),
13  "Failed to retrieve tau selection tool");
15  "Failed to retrieve loose tau selection tool");
16  }

◆ ~Tau()

virtual top::Tau::~Tau ( )
inlinevirtual

Definition at line 23 of file Tau.h.

23 {}

Member Function Documentation

◆ passSelection()

bool top::Tau::passSelection ( const xAOD::TauJet tau) const
overridevirtual

Selection for the main analysis (i.e.

tight object definitions).

Parameters
tauJetThe tau in question
Returns
True if it passes the selection, false otherwise.

Implements top::TauSelectionBase.

Definition at line 18 of file Tau.cxx.

18  {
19  // Get the WP related decisions from TauSelectionTool
20 
21  // HIGG8D1 derivations (and possibly others) skim away
22  // tau tracks with pT<15 GeV. The tau selector tool
23  // returns an exception in this case. These taus should
24  // NOT be selected so return false if an exception is raised.
25  try {
26  return static_cast<bool>(m_tauSelection->accept(tau));
27  } catch (std::runtime_error& e) {
28  // If an exception is raised (possibly due to no tau track)
29  // then return false
30  return false;
31  }
32  }

◆ passSelectionLoose()

bool top::Tau::passSelectionLoose ( const xAOD::TauJet tau) const
overridevirtual

Selection for the "loose" object definitions (e.g.

in fakes estimates).

Parameters
tauJetThe tau in question
Returns
True if it passes the selection, false otherwise.

Implements top::TauSelectionBase.

Definition at line 34 of file Tau.cxx.

34  {
35  // get the WP related decisions from TauSelectionTool
36  // For the reasoning behind try/catch see above...
37  try {
38  return static_cast<bool>(m_tauSelectionLoose->accept(tau));
39  } catch (std::runtime_error& e) {
40  return false;
41  }
42  }

◆ print()

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

Why would you not want to know what you're running?

Parameters
osPrint details of the cuts to the output stream.

Implements top::TauSelectionBase.

Definition at line 44 of file Tau.cxx.

44  {
45  os << "Tau\n";
46  os << " * Taus are now selected using the TauSelectionTool" << "\n";
47  os << " * Either you have supplied a tau configuration file (expert)\n";
48  os << " or set pT, JetIDWP and EleOLR options in your top-xaod\n";
49  os << " configuration file.";
50  }

Member Data Documentation

◆ m_tauSelection

ToolHandle<TauAnalysisTools::TauSelectionTool> top::Tau::m_tauSelection
protected

Definition at line 49 of file Tau.h.

◆ m_tauSelectionLoose

ToolHandle<TauAnalysisTools::TauSelectionTool> top::Tau::m_tauSelectionLoose
protected

Definition at line 52 of file Tau.h.


The documentation for this class was generated from the following files:
top::Tau::m_tauSelection
ToolHandle< TauAnalysisTools::TauSelectionTool > m_tauSelection
Definition: Tau.h:49
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
top::Tau::m_tauSelectionLoose
ToolHandle< TauAnalysisTools::TauSelectionTool > m_tauSelectionLoose
Definition: Tau.h:52
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26