![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
14 using namespace TopObjectSelectionTools;
17 IsolationBase::IsolationBase() {
20 IsolationBase::~IsolationBase() {
25 m_cutvalue(cutvalue) {
45 throw std::runtime_error(
"TopObjectSelectionTools::IsolationTools::AbsoluteIsolationDC14: Not an electron or muon");
54 os <<
" * AbsoluteIsolationDC14\n";
61 double fractionLoose) :
63 m_fractionLoose(fractionLoose) {
65 throw std::runtime_error(
"TopObjectSelectionTools::IsolationTools::RelativePTVarCone: "
66 "ptvarcone only supports cone sizes of 20, 30, 40\n and you asked for " +
std::to_string (
size));
74 ss <<
"ptvarcone" << sizeLoose;
87 os <<
" * RelativePTVarCone\n";
93 m_fractionLoose(fractionLoose) {
97 return(
p.auxdataConst<
float>(
"miniIso") /
p.pt() <
m_fraction);
105 os <<
" * Approximate Mini Isolation\n";
110 m_workingPoint(workingPoint) {
114 <<
"\" which is not appropriate for AntiMuons.\n"
115 <<
"Will use \"AntiMuon_nominal\" instead.");
121 ATH_MSG_ERROR(
"Cannot use undefined isolation working point "
123 <<
" for AntiMuons.\n"
124 <<
"Should be one of \"AntiMuon_nominal\", \"AntiMuon_shapeSyst1\", \"AntiMuon_shapeSyst2\".");
125 throw std::runtime_error(
"Attempt to use inappropriate isolation working point for AntiMuons");
132 ATH_MSG_ERROR(
"Cannot use this function for anything else but muons");
133 throw std::runtime_error(
"Cannot use this function for anything else but muons");
138 ATH_MSG_ERROR(
"Impossible to cast pointer to xAOD::IParticle into pointer to xAOD::Muon");
139 throw std::runtime_error(
"Impossible to cast pointer to xAOD::IParticle into pointer to xAOD::Muon");
142 if (
mu->energyLossType() != xAOD::Muon::NotIsolated)
return false;
145 bool ok =
mu->parameter(eloss, xAOD::Muon::EnergyLoss);
146 if (ok && eloss > 6000)
return false;
150 if (ok &&
etcone20 /
mu->pt() < 0.03)
return false;
168 os <<
" * energyLossType : NotIsolated\n";
169 os <<
" * EnergyLoss <= 6 GeV\n";
170 os <<
" * etcone20/pT > 0.03\n";
172 os <<
" * ptvarcone40/pT <= 0.1\n";
175 os <<
" * ptvarcone40/pT <= 0.05\n";
178 os <<
" * 0.05 < ptvarcone40/pT <= 0.1\n";
183 const std::string& looseLeptonIsolation) :
184 m_tightLeptonDecoration(
"AnalysisTop_Isol_" + tightLeptonIsolation),
185 m_looseLeptonDecoration(
"AnalysisTop_Isol_" + looseLeptonIsolation),
186 m_tightLeptonIsolation(tightLeptonIsolation),
187 m_looseLeptonIsolation(looseLeptonIsolation),
188 m_doTightIsolation(true),
189 m_doLooseIsolation(true),
190 m_doTightPromptLeptonIso(false),
191 m_doLoosePromptLeptonIso(false),
205 <<
" which is suitable for AntiMuons only.");
206 throw std::runtime_error(
"Attempt to use inappropriate isolation working point, suitable for AntiMuons only");
213 <<
" which is suitable for AntiMuons only.");
214 throw std::runtime_error(
"Attempt to use inappropriate isolation working point, suitable for AntiMuons only");
237 p.auxdataConst<
char>(
"AnalysisTop_Isol_Loose") == 1) {
268 p.auxdataConst<
char>(
"AnalysisTop_Isol_Loose") == 1) {
281 os <<
" * Standard Isolation\n";
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
std::string m_size
The name of the variable to access, e.g. ptvarcone20 formed in the constructor.
Electron_v1 Electron
Definition of the current "egamma version".
AntiMuonIsolation(const std::string &workingPoint="AntiMuon_Nominal")
Applies the cuts to etcone and ptcone like we used to in Run-I.
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the anti-muon isolation cuts?
TopConfig A simple configuration that is NOT a singleton.
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
std::string tightLeptonIsolation()
std::string m_tightLeptonDecoration
std::string m_workingPoint
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the loose analysis definitions (useful for background ...
Class providing the definition of the 4-vector interface.
std::string looseLeptonIsolation()
virtual bool passSelection(const xAOD::IParticle &p) const override
For applying isolation cuts to the analysis (tight) lepton.
virtual void print(std::ostream &os) const override
Because people like to know what isolation cuts they're applying.
double m_fraction
For the main analysis object selection.
ApproxPTVarCone(double fraction, double fractionLoose)
An approximation of mini-isolation.
@ etcone20
Calorimeter isolation.
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
StandardIsolation(const std::string &tightLeptonIsolation, const std::string &looseLeptonIsolation)
Applies the cuts to etcone and ptcone like we used to in Run-I.
IsolationType
Overall enumeration for isolation types in xAOD files.
std::string to_string(const DetectorType &type)
virtual bool passSelection(const xAOD::IParticle &p) const override
Does this particle pass the isolation cuts for the main analysis definitions?
std::string m_looseLeptonDecoration
Photon_v1 Photon
Definition of the current "egamma version".
struct TBPatternUnitContext Muon
std::string m_sizeLoose
Name of the variable to access for the loose object definition.
double m_fractionLoose
For the objects used in the looser object selection (e.g. matrix method fakes)
double m_cutvalue
The value, in MeV, to cut.
#define ATH_MSG_WARNING(x)
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
bool m_doLoosePromptLeptonIso
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.
Hold the configuration information for the whole run.
double m_fractionLoose
For the objects used in the looser object selection (e.g. matrix method fakes)
double m_fraction
For the main analysis object selection.
xAOD::Iso::IsolationType m_type
What to cut on (topoetcone20, 30, 40 or ptcone20, 30, 40).
bool m_doTightPromptLeptonIso
virtual bool passSelectionLoose(const xAOD::IParticle &p) const override
Implement me!
virtual void print(std::ostream &os) const override
Come on, you really need me to tell you what this does?