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

These should give you access to xAOD::Iso::topoetcone20, 30, 40 and ptcone20, 30, 40. More...

#include <IsolationTools.h>

Inheritance diagram for top::AbsoluteIsolationDC14:
Collaboration diagram for top::AbsoluteIsolationDC14:

Public Member Functions

 AbsoluteIsolationDC14 (const xAOD::Iso::IsolationType type, double value)
 Absolute cut on topoetcone or ptcone. More...
 
virtual bool passSelection (const xAOD::IParticle &p) const override
 For applying isolation cuts to the analysis (tight) lepton. More...
 
virtual bool passSelectionLoose (const xAOD::IParticle &p) const override
 Implement me! More...
 
virtual void print (std::ostream &os) const override
 Because people like to know what isolation cuts they're applying. More...
 

Protected Attributes

xAOD::Iso::IsolationType m_type
 What to cut on (topoetcone20, 30, 40 or ptcone20, 30, 40). More...
 
double m_cutvalue
 The value, in MeV, to cut. More...
 

Detailed Description

These should give you access to xAOD::Iso::topoetcone20, 30, 40 and ptcone20, 30, 40.

They are only correct in the derivations, they will be wrong in the primary xAOD.

It performs an absolute cut on the quantity you specify. If you need more fancy things, we should implement them. Don't you want to look at using RelativePTVarCone instead though?

Definition at line 63 of file IsolationTools.h.

Constructor & Destructor Documentation

◆ AbsoluteIsolationDC14()

top::AbsoluteIsolationDC14::AbsoluteIsolationDC14 ( const xAOD::Iso::IsolationType  type,
double  value 
)

Absolute cut on topoetcone or ptcone.

Construct with something like:

new IsolationDC14(xAOD::Iso::topoetcone20, 5000.)

We didn't bother implementing the loose selection yet. I left that as an exercise for the reader.

Parameters
typeI think xAOD::Iso::topoetcone20, 30, 40 and ptcone20, 30, 40 are allowed.
valueA number in MeV.

Definition at line 23 of file IsolationTools.cxx.

23  :
24  m_type(type),
25  m_cutvalue(cutvalue) {
26  }

Member Function Documentation

◆ passSelection()

bool top::AbsoluteIsolationDC14::passSelection ( const xAOD::IParticle p) const
overridevirtual

For applying isolation cuts to the analysis (tight) lepton.

Note that you must implement this otherwise it wont compile. Ha.

Parameters
pThe lepton
Returns
True if it passes the isolation cuts, false otherwise.

Implements top::IsolationBase.

Definition at line 28 of file IsolationTools.cxx.

28  {
29  //electrons
30  if (p.type() == xAOD::Type::Electron) {
31  float iso = 0.;
32  const xAOD::Electron* el = dynamic_cast<const xAOD::Electron*>(&p);
33  bool exists = el->isolationValue(iso, m_type);
34  return exists && iso > m_cutvalue;
35  }
36 
37  //muons
38  if (p.type() == xAOD::Type::Muon) {
39  float iso = 0.;
40  const xAOD::Muon* mu = dynamic_cast<const xAOD::Muon*>(&p);
41  bool exists = mu->isolation(iso, m_type);
42  return exists && iso > m_cutvalue;
43  }
44 
45  throw std::runtime_error("TopObjectSelectionTools::IsolationTools::AbsoluteIsolationDC14: Not an electron or muon");
46  }

◆ passSelectionLoose()

bool top::AbsoluteIsolationDC14::passSelectionLoose ( const xAOD::IParticle p) const
overridevirtual

Implement me!

Implements top::IsolationBase.

Definition at line 49 of file IsolationTools.cxx.

49  {
50  return true;
51  }

◆ print()

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

Because people like to know what isolation cuts they're applying.

Parameters
osWhere to print things to, e.g. msg stream.

Implements top::IsolationBase.

Definition at line 53 of file IsolationTools.cxx.

53  {
54  os << " * AbsoluteIsolationDC14\n";
55  os << " * " << m_type << " > " << m_cutvalue << " MeV\n";
56  //missing in xaodprimities-00-00-02 os << " * " << xAOD::Iso::toString(m_type) << " > " << m_cutvalue << "
57  // MeV\n";
58  }

Member Data Documentation

◆ m_cutvalue

double top::AbsoluteIsolationDC14::m_cutvalue
protected

The value, in MeV, to cut.

Definition at line 90 of file IsolationTools.h.

◆ m_type

xAOD::Iso::IsolationType top::AbsoluteIsolationDC14::m_type
protected

What to cut on (topoetcone20, 30, 40 or ptcone20, 30, 40).

Definition at line 87 of file IsolationTools.h.


The documentation for this class was generated from the following files:
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition: IsolationType.h:48
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
xAOD::Electron_v1
Definition: Electron_v1.h:34
Muon
struct TBPatternUnitContext Muon
top::AbsoluteIsolationDC14::m_cutvalue
double m_cutvalue
The value, in MeV, to cut.
Definition: IsolationTools.h:90
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
top::AbsoluteIsolationDC14::m_type
xAOD::Iso::IsolationType m_type
What to cut on (topoetcone20, 30, 40 or ptcone20, 30, 40).
Definition: IsolationTools.h:87