ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigEgammaEmulationTool
Root
TrigEgammaEmulationFastElectronHypoTool.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
TrigEgammaEmulationTool/TrigEgammaEmulationFastElectronHypoTool.h
"
7
#include "GaudiKernel/SystemOfUnits.h"
8
9
10
using namespace
Trig
;
11
12
//**********************************************************************
13
14
TrigEgammaEmulationFastElectronHypoTool::TrigEgammaEmulationFastElectronHypoTool
(
const
std::string& myname )
15
:
TrigEgammaEmulationBaseHypoTool
(myname)
16
{}
17
18
19
20
//=================================================================
21
22
bool
TrigEgammaEmulationFastElectronHypoTool::emulate
(
const
Trig::TrigData
&input,
23
bool
&pass)
const
24
{
25
pass=
false
;
26
27
if
( !input.roi )
return
false
;
28
29
if
( input.trig_electrons.empty() )
return
false
;
30
31
for
(
const
auto
&el : input.trig_electrons )
32
{
33
if
(
decide
( input, el ) ){
34
pass=
true
;
35
return
true
;
36
}
37
}
38
39
return
false
;
40
}
41
42
//=================================================================
43
44
bool
TrigEgammaEmulationFastElectronHypoTool::decide
(
const
Trig::TrigData
&
/*input*/
,
45
const
xAOD::TrigElectron
* electron )
const
46
{
47
48
if
(
m_acceptAll
) {
49
ATH_MSG_DEBUG
(
"AcceptAll property is set: taking all events"
);
50
return
true
;
51
}
else
{
52
ATH_MSG_DEBUG
(
"AcceptAll property not set: applying selection"
);
53
}
54
55
56
const
xAOD::TrackParticle
* trkIter = electron-> trackParticle();
57
if
( trkIter == 0 ){
// disconsider candidates without track
58
return
false
;
59
}
60
61
// Retrieve all quantities
62
float
dPhiCalo = electron->trkClusDphi();
63
float
dEtaCalo = electron->trkClusDeta();
64
float
ptCalo = electron->pt();
65
float
eToverPt = electron->etOverPt();
66
float
NTRHits = electron->nTRTHits();
67
float
NStrawHits = electron->nTRTHiThresholdHits();
68
float
TRTHitRatio = NStrawHits == 0 ? 1e10 : NTRHits/NStrawHits;
69
70
if
( ptCalo <
m_trackPt
){
71
ATH_MSG_DEBUG
(
"Fails pt cut"
<< ptCalo <<
" < "
<<
m_trackPt
);
72
return
false
;
73
}
74
75
if
( dEtaCalo >
m_caloTrackDEta
) {
76
ATH_MSG_DEBUG
(
"Fails dEta cut "
<< dEtaCalo <<
" < "
<<
m_caloTrackDEta
);
77
return
false
;
78
}
79
if
( dPhiCalo >
m_caloTrackDPhi
) {
80
ATH_MSG_DEBUG
(
"Fails dPhi cut "
<< dPhiCalo <<
" < "
<<
m_caloTrackDPhi
);
81
return
false
;
82
}
83
84
if
( eToverPt <
m_caloTrackdEoverPLow
) {
85
ATH_MSG_DEBUG
(
"Fails eoverp low cut "
<< eToverPt <<
" < "
<<
m_caloTrackdEoverPLow
);
86
return
false
;
87
}
88
if
( eToverPt >
m_caloTrackdEoverPHigh
) {
89
ATH_MSG_DEBUG
(
"Fails eoverp high cut "
<< eToverPt <<
" < "
<<
m_caloTrackdEoverPHigh
);
90
return
false
;
91
}
92
if
( TRTHitRatio <
m_trtRatio
){
93
ATH_MSG_DEBUG
(
"Fails TRT cut "
<< TRTHitRatio <<
" < "
<<
m_trtRatio
);
94
return
false
;
95
}
96
97
98
if
(
m_doLRT
){
99
ATH_MSG_DEBUG
(
"doLRT: "
<<
m_doLRT
);
100
ATH_MSG_DEBUG
(
"Track d0: "
<<
m_trkd0
);
101
float
trk_d0 = std::fabs(trkIter->
d0
());
102
if
(trk_d0 <
m_trkd0
){
103
ATH_MSG_DEBUG
(
"Fails d0 cut "
<<trk_d0<<
" < "
<<
m_trkd0
);
104
return
false
;
105
}
106
}
107
108
109
ATH_MSG_DEBUG
(
"Passed selection"
);
110
return
true
;
111
112
}
113
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
TrigEgammaEmulationFastElectronHypoTool.h
Trig::TrigData
Definition
TrigEgammaEmulationToolMT.h:40
Trig::TrigEgammaEmulationBaseHypoTool::TrigEgammaEmulationBaseHypoTool
TrigEgammaEmulationBaseHypoTool(const std::string &myname)
Definition
TrigEgammaEmulationBaseHypoTool.cxx:12
Trig::TrigEgammaEmulationFastElectronHypoTool::emulate
virtual bool emulate(const Trig::TrigData &input, bool &pass) const override
Definition
TrigEgammaEmulationFastElectronHypoTool.cxx:22
Trig::TrigEgammaEmulationFastElectronHypoTool::TrigEgammaEmulationFastElectronHypoTool
TrigEgammaEmulationFastElectronHypoTool(const std::string &myname)
Definition
TrigEgammaEmulationFastElectronHypoTool.cxx:14
Trig::TrigEgammaEmulationFastElectronHypoTool::m_caloTrackDPhi
Gaudi::Property< float > m_caloTrackDPhi
Definition
TrigEgammaEmulationFastElectronHypoTool.h:39
Trig::TrigEgammaEmulationFastElectronHypoTool::m_caloTrackdEoverPLow
Gaudi::Property< float > m_caloTrackdEoverPLow
Definition
TrigEgammaEmulationFastElectronHypoTool.h:40
Trig::TrigEgammaEmulationFastElectronHypoTool::m_trackPt
Gaudi::Property< float > m_trackPt
Definition
TrigEgammaEmulationFastElectronHypoTool.h:37
Trig::TrigEgammaEmulationFastElectronHypoTool::decide
bool decide(const Trig::TrigData &input, const xAOD::TrigElectron *electron) const
Definition
TrigEgammaEmulationFastElectronHypoTool.cxx:44
Trig::TrigEgammaEmulationFastElectronHypoTool::m_trkd0
Gaudi::Property< float > m_trkd0
Definition
TrigEgammaEmulationFastElectronHypoTool.h:43
Trig::TrigEgammaEmulationFastElectronHypoTool::m_caloTrackDEta
Gaudi::Property< float > m_caloTrackDEta
Definition
TrigEgammaEmulationFastElectronHypoTool.h:38
Trig::TrigEgammaEmulationFastElectronHypoTool::m_caloTrackdEoverPHigh
Gaudi::Property< float > m_caloTrackdEoverPHigh
Definition
TrigEgammaEmulationFastElectronHypoTool.h:41
Trig::TrigEgammaEmulationFastElectronHypoTool::m_doLRT
Gaudi::Property< bool > m_doLRT
Definition
TrigEgammaEmulationFastElectronHypoTool.h:36
Trig::TrigEgammaEmulationFastElectronHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition
TrigEgammaEmulationFastElectronHypoTool.h:35
Trig::TrigEgammaEmulationFastElectronHypoTool::m_trtRatio
Gaudi::Property< float > m_trtRatio
Definition
TrigEgammaEmulationFastElectronHypoTool.h:42
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::TrigElectron
TrigElectron_v1 TrigElectron
Declare the latest version of the class.
Definition
Event/xAOD/xAODTrigEgamma/xAODTrigEgamma/TrigElectron.h:16
Generated on
for ATLAS Offline Software by
1.17.0