ATLAS Offline Software
IsolationTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef ISOLATIONTOOLS_H_
6 #define ISOLATIONTOOLS_H_
7 
8 #include "xAODBase/IParticle.h"
10 
11 namespace top {
16  class IsolationBase {
17  public:
19  IsolationBase();
20 
22  virtual ~IsolationBase();
23 
32  virtual bool passSelection(const xAOD::IParticle& p) const = 0;
33 
42  virtual bool passSelectionLoose(const xAOD::IParticle& p) const = 0;
43 
49  virtual void print(std::ostream& os) const = 0;
50  };
51 
64  public:
82  virtual bool passSelection(const xAOD::IParticle& p) const override;
83  virtual bool passSelectionLoose(const xAOD::IParticle& p) const override;
84  virtual void print(std::ostream& os) const override;
85  protected:
88 
90  double m_cutvalue;
91  };
92 
98  public:
108  RelativePTVarCone(unsigned int size, double fraction, unsigned int sizeLoose, double fractionLoose);
109 
117  virtual bool passSelection(const xAOD::IParticle& p) const override;
118 
126  virtual bool passSelectionLoose(const xAOD::IParticle& p) const override;
127 
129  virtual void print(std::ostream& os) const override;
130  protected:
132  std::string m_size;
133 
135  double m_fraction;
136 
138  std::string m_sizeLoose;
139 
142  };
143 
154  public:
164  ApproxPTVarCone(double fraction, double fractionLoose);
165 
173  virtual bool passSelection(const xAOD::IParticle& p) const override;
174 
182  virtual bool passSelectionLoose(const xAOD::IParticle& p) const override;
183 
185  virtual void print(std::ostream& os) const override;
186  protected:
188  double m_fraction;
189 
192  };
193 
198  public:
204  AntiMuonIsolation(const std::string& workingPoint = "AntiMuon_Nominal");
205 
212  virtual bool passSelection(const xAOD::IParticle& p) const override;
213 
220  virtual bool passSelectionLoose(const xAOD::IParticle& /*p*/) const override {return true;};
221 
223  virtual void print(std::ostream& os) const override;
224  protected:
225  std::string m_workingPoint;
226  };
227 
232  public:
238  StandardIsolation(const std::string& tightLeptonIsolation,
239  const std::string& looseLeptonIsolation);
240 
248  virtual bool passSelection(const xAOD::IParticle& p) const override;
249 
257  virtual bool passSelectionLoose(const xAOD::IParticle& p) const override;
258 
261 
263  virtual void print(std::ostream& os) const override;
264  protected:
273  bool m_skipUnavailable; // skip unavailable working points (instead of aborting)
274  };
275 }
276 
277 #endif
top::AntiMuonIsolation::print
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
Definition: IsolationTools.cxx:166
top::RelativePTVarCone::print
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
Definition: IsolationTools.cxx:86
top::RelativePTVarCone::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
Definition: IsolationTools.cxx:82
top::RelativePTVarCone::m_size
std::string m_size
The name of the variable to access, e.g. ptvarcone20 formed in the constructor.
Definition: IsolationTools.h:132
top::AntiMuonIsolation::AntiMuonIsolation
AntiMuonIsolation(const std::string &workingPoint="AntiMuon_Nominal")
Applies the cuts to etcone and ptcone like we used to in Run-I.
Definition: IsolationTools.cxx:109
top::AntiMuonIsolation::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the anti-muon isolation cuts?
Definition: IsolationTools.cxx:129
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
IParticle.h
top::StandardIsolation::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
Definition: IsolationTools.cxx:249
top::AntiMuonIsolation::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &) const override
Loose WP not implemented for Anti-muon.
Definition: IsolationTools.h:220
top::IsolationBase::~IsolationBase
virtual ~IsolationBase()
Destroy!
Definition: IsolationTools.cxx:20
top::StandardIsolation
Apply the cuts to etcone and ptcone like we used to in Run-I.
Definition: IsolationTools.h:231
top::StandardIsolation::tightLeptonIsolation
std::string tightLeptonIsolation()
Definition: IsolationTools.h:259
top::StandardIsolation::m_tightLeptonDecoration
std::string m_tightLeptonDecoration
Definition: IsolationTools.h:265
IsolationType.h
top::AntiMuonIsolation::m_workingPoint
std::string m_workingPoint
Definition: IsolationTools.h:225
top::StandardIsolation::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
Definition: IsolationTools.cxx:218
athena.value
value
Definition: athena.py:122
top::ApproxPTVarCone::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
Definition: IsolationTools.cxx:100
top::IsolationBase::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const =0
For applying isolation cuts to the analysis (tight) lepton.
top::StandardIsolation::m_tightLeptonIsolation
std::string m_tightLeptonIsolation
Definition: IsolationTools.h:267
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
top::StandardIsolation::looseLeptonIsolation
std::string looseLeptonIsolation()
Definition: IsolationTools.h:260
top::AbsoluteIsolationDC14::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const override
For applying isolation cuts to the analysis (tight) lepton.
Definition: IsolationTools.cxx:28
top::StandardIsolation::m_doLooseIsolation
bool m_doLooseIsolation
Definition: IsolationTools.h:270
top::AbsoluteIsolationDC14::print
virtual void print(std::ostream &os) const override
Because people like to know what isolation cuts they're applying.
Definition: IsolationTools.cxx:53
top::ApproxPTVarCone::m_fraction
double m_fraction
For the main analysis object selection.
Definition: IsolationTools.h:188
top::ApproxPTVarCone::ApproxPTVarCone
ApproxPTVarCone(double fraction, double fractionLoose)
An approximation of mini-isolation.
Definition: IsolationTools.cxx:91
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
top::AntiMuonIsolation
Apply the cuts relevant for Anti-muon model.
Definition: IsolationTools.h:197
top::AbsoluteIsolationDC14
These should give you access to xAOD::Iso::topoetcone20, 30, 40 and ptcone20, 30, 40.
Definition: IsolationTools.h:63
top::ApproxPTVarCone::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
Definition: IsolationTools.cxx:96
top::StandardIsolation::StandardIsolation
StandardIsolation(const std::string &tightLeptonIsolation, const std::string &looseLeptonIsolation)
Applies the cuts to etcone and ptcone like we used to in Run-I.
Definition: IsolationTools.cxx:182
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
top::IsolationBase::print
virtual void print(std::ostream &os) const =0
Because people like to know what isolation cuts they're applying.
top::StandardIsolation::m_doTightIsolation
bool m_doTightIsolation
Definition: IsolationTools.h:269
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
top::RelativePTVarCone::passSelection
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
Definition: IsolationTools.cxx:78
top::StandardIsolation::m_looseLeptonDecoration
std::string m_looseLeptonDecoration
Definition: IsolationTools.h:266
top::RelativePTVarCone::m_sizeLoose
std::string m_sizeLoose
Name of the variable to access for the loose object definition.
Definition: IsolationTools.h:138
top::AbsoluteIsolationDC14::AbsoluteIsolationDC14
AbsoluteIsolationDC14(const xAOD::Iso::IsolationType type, double value)
Absolute cut on topoetcone or ptcone.
Definition: IsolationTools.cxx:23
top::ApproxPTVarCone::m_fractionLoose
double m_fractionLoose
For the objects used in the looser object selection (e.g. matrix method fakes)
Definition: IsolationTools.h:191
top::AbsoluteIsolationDC14::m_cutvalue
double m_cutvalue
The value, in MeV, to cut.
Definition: IsolationTools.h:90
top::RelativePTVarCone
Yay DC14 now has isolation! This should allow you to cut on the isolation (ptvarcone) as a fraction o...
Definition: IsolationTools.h:97
top::IsolationBase::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &p) const =0
For applying loose isolation cuts to the loose lepton.
top::IsolationBase
A common base for implementing isolation cuts.
Definition: IsolationTools.h:16
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
top::StandardIsolation::print
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
Definition: IsolationTools.cxx:280
top::StandardIsolation::m_looseLeptonIsolation
std::string m_looseLeptonIsolation
Definition: IsolationTools.h:268
top::StandardIsolation::m_skipUnavailable
bool m_skipUnavailable
Definition: IsolationTools.h:273
top::ApproxPTVarCone
Danilo's approximation of mini-isolation which has been calculated in AnalysisTop and applied as a de...
Definition: IsolationTools.h:153
top::StandardIsolation::m_doLoosePromptLeptonIso
bool m_doLoosePromptLeptonIso
Definition: IsolationTools.h:272
top::RelativePTVarCone::RelativePTVarCone
RelativePTVarCone(unsigned int size, double fraction, unsigned int sizeLoose, double fractionLoose)
Cut on the mini-isolation (aka ptvarcone) as a fraction of the pt of the lepton.
Definition: IsolationTools.cxx:60
top::IsolationBase::IsolationBase
IsolationBase()
Create.
Definition: IsolationTools.cxx:17
top::RelativePTVarCone::m_fractionLoose
double m_fractionLoose
For the objects used in the looser object selection (e.g. matrix method fakes)
Definition: IsolationTools.h:141
top::RelativePTVarCone::m_fraction
double m_fraction
For the main analysis object selection.
Definition: IsolationTools.h:135
top::AbsoluteIsolationDC14::m_type
xAOD::Iso::IsolationType m_type
What to cut on (topoetcone20, 30, 40 or ptcone20, 30, 40).
Definition: IsolationTools.h:87
top::StandardIsolation::m_doTightPromptLeptonIso
bool m_doTightPromptLeptonIso
Definition: IsolationTools.h:271
top::AbsoluteIsolationDC14::passSelectionLoose
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Implement me!
Definition: IsolationTools.cxx:49
top::ApproxPTVarCone::print
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
Definition: IsolationTools.cxx:104