ATLAS Offline Software
Loading...
Searching...
No Matches
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
8
9#include <sstream>
10#include <cmath>
11#include <algorithm>
12#include <numeric>
13
15 double /*ht_max*/):
16 m_htMin(ht_min) {
17}
18
19
20bool
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
54 std::stringstream ss;
55 ss << "HTConditionFastReduction: htMin: "
56 << m_htMin;
57
58
59
60 ss <<'\n';
61
62 return ss.str();
63}
64
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
std::string toString() const override
HTConditionFastReduction(double htMin, double htMax)