ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
EMFCondition.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
#
5
#include "
./EMFCondition.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h
"
8
#include "
./DebugInfoCollector.h
"
9
10
#include <sstream>
11
#include <cmath>
12
#include <TLorentzVector.h>
13
14
EMFCondition::EMFCondition
(
double
threshold
) :
m_min
(
threshold
) {
15
}
16
17
18
bool
EMFCondition::isSatisfied
(
const
pHypoJet
& ip,
19
const
std::unique_ptr<ITrigJetHypoInfoCollector>& collector)
const
{
20
21
float
emf =999;
22
ip->getAttribute(
"EMFrac"
,emf);
23
bool
pass =
m_min
>= emf;
24
25
if
(collector){
26
const
void
* address =
static_cast<
const
void
*
>
(
this
);
27
28
std::stringstream ss0;
29
ss0 <<
"EMFCondition: ("
<< address <<
") "
30
<<
" emf thresh "
<<
m_min
31
<<
" pass: "
<< std::boolalpha << pass <<
'\n'
;
32
33
auto
j_addr =
static_cast<
const
void
*
>
(ip.get());
34
std::stringstream ss1;
35
ss1 <<
" jet : ("
<< j_addr <<
")"
36
" emf "
<< emf <<
'\n'
;
37
38
collector->collect(ss0.str(), ss1.str());
39
40
}
41
return
pass;
42
}
43
44
45
bool
46
EMFCondition::isSatisfied
(
const
HypoJetVector
& ips,
47
const
std::unique_ptr<ITrigJetHypoInfoCollector>& c)
const
{
48
auto
result =
isSatisfied
(ips[0], c);
49
return
result;
50
}
51
52
53
std::string
EMFCondition::toString
()
const
{
54
std::stringstream
ss
;
55
ss
<<
"EMFCondition ("
<<
this
<<
") "
56
<<
" EMF threshold: "
57
<<
m_min
58
<<
'\n'
;
59
60
return
ss
.str();
61
}
DebugInfoCollector.h
EMFCondition.h
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition
HypoJetDefs.h:25
IJet.h
ITrigJetHypoInfoCollector.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
EMFCondition::m_min
double m_min
Definition
EMFCondition.h:38
EMFCondition::toString
std::string toString() const override
Definition
EMFCondition.cxx:53
EMFCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
EMFCondition.cxx:46
EMFCondition::EMFCondition
EMFCondition(double threshold)
Definition
EMFCondition.cxx:14
threshold
Definition
chainparser.cxx:74
Generated on
for ATLAS Offline Software by
1.17.0