ATLAS Offline Software
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 
20 bool
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 
HTConditionFastReduction::HTConditionFastReduction
HTConditionFastReduction(double htMin, double htMax)
Definition: HTConditionFastReduction.cxx:14
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
HypoJetDefs.h
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
HTConditionFastReduction.h
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition: HypoJetDefs.h:25
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
HTConditionFastReduction::toString
std::string toString() const override
Definition: HTConditionFastReduction.cxx:53
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
HTConditionFastReduction::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: HTConditionFastReduction.cxx:21
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
Trig::FeatureAccessImpl::collect
void collect(const HLT::TriggerElement *te, std::vector< Trig::Feature< T > > &data, const std::string &label, unsigned int condition, const std::string &teName, const HLT::TrigNavStructure *navstructure)
actual feature acceess implementation It has (thanks to the ClassTraits) functionality to flatten con...
Definition: FeatureCollectAthena.h:299
HTConditionFastReduction::m_htMin
double m_htMin
Definition: HTConditionFastReduction.h:45