ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MET
METUtilities
Root
CutsMETMaker.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
Authors: Teng Jian Khoo <teng.jian.khoo@cern.ch>
7
Russell Smith <rsmith@cern.ch>
8
9
These selections are available as a courtesy for users to easily validate they are correctly using the METMaker code.
10
These are the cuts used in the METRebuilder, so you can easily compare and make sure you are doing the same thing with the METMaker
11
These selections are NOT optimized, especially the muon term, and as such should be optimized within physics groups
12
SW note no changes required for MT mode
13
*/
14
#include "
METUtilities/CutsMETMaker.h
"
15
16
//namespace CutsMETMaker{
17
18
StatusCode
CutsMETMaker::accept
(
const
xAOD::Muon
* mu)
19
{
20
21
if
(mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3)
return
StatusCode::FAILURE;
22
if
(mu->muonType()==xAOD::Muon::MuonType::MuonStandAlone) {
23
// only take forward SA -- need a max eta cut?
24
if
(fabs(mu->eta())<2.5)
return
StatusCode::FAILURE;
25
uint8_t nPrecision=0;
26
mu->trackParticle(xAOD::Muon::TrackParticleType::Primary)->summaryValue(nPrecision,
xAOD::numberOfPrecisionLayers
);
27
if
(nPrecision<3)
return
StatusCode::FAILURE;
28
}
// selection for StandAlone muons
29
else
if
(mu->muonType()==xAOD::Muon::MuonType::Combined || mu->muonType()==xAOD::Muon::MuonType::SegmentTagged) {
30
if
(fabs(mu->eta())>2.5)
return
StatusCode::FAILURE;
31
32
// could add some error checking to make sure we successfully read the details
33
uint8_t nPixHits{0}, nSctHits{0};
34
mu->trackParticle(xAOD::Muon::TrackParticleType::Primary)->summaryValue(nPixHits,
xAOD::numberOfPixelHits
);
35
mu->trackParticle(xAOD::Muon::TrackParticleType::Primary)->summaryValue(nSctHits,
xAOD::numberOfSCTHits
);
36
37
if
(nPixHits<3)
return
StatusCode::FAILURE;
38
if
(nPixHits+nSctHits<5)
return
StatusCode::FAILURE;
39
}
// selection for SegmentTagged and Combined muons
40
else
{
return
StatusCode::FAILURE;}
// don't CutMETMaker::accept forward muons or calo tagged
41
42
return
StatusCode::SUCCESS;
43
}
44
45
StatusCode
CutsMETMaker::accept
(
const
xAOD::Electron
* el)
46
{
47
48
//ATH_MSG_VERBOSE("Test electron quality."
49
// << " pT = " << el->pt()
50
// << " eta = " << el->eta()
51
// << " phi = " << el->phi());
52
53
bool
testPID = 0;
54
el->passSelection(testPID,
"Medium"
);
55
//ATH_MSG_VERBOSE("Electron PID \"Medium\" tests " << (testPID ? " GOOD" : "BAD") );
56
if
( !testPID )
return
StatusCode::FAILURE;
57
58
//ATH_MSG_VERBOSE("Electron author = " << el->author() << " test " << (el->author()&17));
59
if
( !(el->author()&17) )
return
StatusCode::FAILURE;
60
61
if
( el->pt()<10e3 )
return
StatusCode::FAILURE;
62
if
( fabs(el->eta())>2.47 )
return
StatusCode::FAILURE;
63
64
// if( m_el_rejectCrack ) {
65
// if( fabs(el->eta())>1.37 &&
66
// fabs(el->eta())<1.52 ) return StatusCode::FAILURE;
67
// }
68
69
//ATH_MSG_VERBOSE("CutMETMaker::Accepted this electron");
70
71
return
StatusCode::SUCCESS;
72
}
73
74
StatusCode
CutsMETMaker::accept
(
const
xAOD::Photon
* ph)
75
{
76
77
//ATH_MSG_VERBOSE("Test photon quality."
78
// << " pT = " << ph->pt()
79
// << " eta = " << ph->eta()
80
// << " phi = " << ph->phi());
81
82
bool
testPID = 0;
83
ph->
passSelection
(testPID,
"Tight"
);
84
//ATH_MSG_VERBOSE("Photon PID \"Tight\" tests " << (testPID ? " GOOD" : "BAD") );
85
if
( !testPID )
return
StatusCode::FAILURE;
86
87
//ATH_MSG_VERBOSE("Photon author = " << ph->author() << " test " << (ph->author()&20));
88
if
( !(ph->
author
()&20) )
return
StatusCode::FAILURE;
89
90
if
( ph->
pt
()<10e3 )
return
StatusCode::FAILURE;
91
if
( fabs(ph->
eta
())>2.47 )
return
StatusCode::FAILURE;
92
93
//ATH_MSG_VERBOSE("CutMETMaker::Accepted this photon");
94
95
return
StatusCode::SUCCESS;
96
}
97
98
StatusCode
CutsMETMaker::accept
(
const
xAOD::TauJet
* tau)
99
{
100
//ATH_MSG_VERBOSE("Testing tau with pt " << tau->pt() << ", eta " << tau->eta());
101
//ATH_MSG_VERBOSE("Tau ID discriminants:"
102
// << " jet " << tau->discriminant(xAOD::TauJetParameters::BDTJetScore)
103
// << " el " << tau->discriminant(xAOD::TauJetParameters::BDTEleScore)
104
// << " mu " << tau->flag(xAOD::TauJetParameters::MuonFlag));
105
106
if
(tau->
pt
()<20e3 || fabs(tau->
eta
())>2.5)
return
StatusCode::FAILURE;
107
// need to accommodate more than one of these?
108
static
const
SG::ConstAccessor<char>
accGNTauMedium(
"GNTauM_v0prune"
);
109
if
(!(
static_cast<
bool
>
(accGNTauMedium(*tau))))
return
StatusCode::FAILURE;
110
if
(tau->
isTau
(
xAOD::TauJetParameters::IsTauFlag
(
xAOD::TauJetParameters::EleRNNMedium
) ))
return
StatusCode::FAILURE;
111
if
(tau->
isTau
(
xAOD::TauJetParameters::IsTauFlag
(
xAOD::TauJetParameters::MuonVeto
) ))
return
StatusCode::FAILURE;
112
113
return
StatusCode::SUCCESS;
114
}
115
//}
CutsMETMaker.h
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
xAOD::Egamma_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition
Egamma_v1.cxx:66
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
Egamma_v1.cxx:71
xAOD::Egamma_v1::passSelection
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
xAOD::Egamma_v1::author
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.
Definition
Egamma_v1.cxx:155
xAOD::TauJet_v3::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::TauJet_v3::isTau
bool isTau(TauJetParameters::IsTauFlag flag) const
Get Flag for tau acceptance based on predefined arbitrary criteria.
Definition
TauJet_v3.cxx:245
xAOD::TauJet_v3::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition
CutsMETMaker.cxx:18
xAOD::TauJetParameters::IsTauFlag
IsTauFlag
Enum for IsTau flags.
Definition
TauDefs.h:116
xAOD::TauJetParameters::EleRNNMedium
@ EleRNNMedium
Definition
TauDefs.h:133
xAOD::TauJetParameters::MuonVeto
@ MuonVeto
Definition
TauDefs.h:121
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
TauJet.h:17
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
xAOD::numberOfPrecisionLayers
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
Definition
TrackingPrimitives.h:294
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition
TrackingPrimitives.h:269
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition
TrackingPrimitives.h:260
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
Generated on
for ATLAS Offline Software by
1.17.0