ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
HTConditionFastReduction.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
./HTConditionFastReduction.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h
"
8
9
#include <sstream>
10
#include <cmath>
11
#include <algorithm>
12
#include <numeric>
13
14
HTConditionFastReduction::HTConditionFastReduction
(
double
ht_min,
15
double
/*ht_max*/
):
16
m_htMin
(ht_min) {
17
}
18
19
20
bool
21
HTConditionFastReduction::isSatisfied
(
const
HypoJetVector
& ips,
22
const
std::unique_ptr<ITrigJetHypoInfoCollector>& collector)
const
{
23
24
auto
htsum = std::accumulate(ips.begin(),
25
ips.end(),
26
0.0,
27
[](
double
sum,
const
pHypoJet
& jp){
28
return sum + jp->et();});
29
bool
pass = htsum >
m_htMin
;
30
31
if
(collector){
32
std::stringstream ss0;
33
const
void
* address =
static_cast<
const
void
*
>
(
this
);
34
ss0 <<
"HTCondition: ("
<< address <<
") Sum(et) "
35
<< htsum <<
" "
36
<< std::boolalpha << pass <<
" jet group: \n"
;
37
38
std::stringstream ss1;
39
40
for
(
const
auto
& ip : ips){
41
address =
static_cast<
const
void
*
>
(ip.get());
42
ss1 <<
" "
<< address <<
" "
<< ip->eta() <<
" e "
<< ip->e() <<
'\n'
;
43
}
44
ss1 <<
'\n'
;
45
collector -> collect(ss0.str(), ss1.str());
46
}
47
48
return
pass;
49
50
}
51
52
53
std::string
HTConditionFastReduction::toString
()
const
{
54
std::stringstream
ss
;
55
ss
<<
"HTConditionFastReduction: htMin: "
56
<<
m_htMin
;
57
58
59
60
ss
<<
'\n'
;
61
62
return
ss
.str();
63
}
64
HTConditionFastReduction.h
HypoJetDefs.h
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition
HypoJetDefs.h:25
ITrigJetHypoInfoCollector.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
HTConditionFastReduction::m_htMin
double m_htMin
Definition
HTConditionFastReduction.h:45
HTConditionFastReduction::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
HTConditionFastReduction.cxx:21
HTConditionFastReduction::toString
std::string toString() const override
Definition
HTConditionFastReduction.cxx:53
HTConditionFastReduction::HTConditionFastReduction
HTConditionFastReduction(double htMin, double htMax)
Definition
HTConditionFastReduction.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0