ATLAS Offline Software
PtCondition.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 "./PtCondition.h"
8 
9 #include <sstream>
10 #include <cmath>
11 #include <TLorentzVector.h>
12 
14 }
15 
16 
18  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
19  auto pt = ip->pt();
20  bool pass = m_min <= pt;
21 
22  if(collector){
23  const void* address = static_cast<const void*>(this);
24 
25  std::stringstream ss0;
26  ss0 << "PtCondition: (" << address << ") "
27  << " pt thresh " << m_min
28  << " pass: " << std::boolalpha << pass << '\n';
29 
30  auto j_addr = static_cast<const void*>(ip.get());
31  std::stringstream ss1;
32  ss1 << " jet : ("<< j_addr << ")"
33  " pt " << pt << '\n';
34 
35  collector->collect(ss0.str(), ss1.str());
36 
37  }
38  return pass;
39 }
40 
41 
42 bool
44  const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
45  auto result = isSatisfied(ips[0], c);
46  return result;
47 }
48 
49 
50 std::string PtCondition::toString() const {
51  std::stringstream ss;
52  ss << "PtCondition (" << this << ") "
53  << " Pt threshold: "
54  << m_min
55  <<'\n';
56 
57  return ss.str();
58 }
PtCondition::m_min
double m_min
Definition: PtCondition.h:38
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
IJet.h
test_pyathena.pt
pt
Definition: test_pyathena.py:11
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition: HypoJetDefs.h:25
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
PtCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: PtCondition.cxx:43
threshold
Definition: chainparser.cxx:74
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
PtCondition::toString
std::string toString() const override
Definition: PtCondition.cxx:50
PtCondition.h
python.compressB64.c
def c
Definition: compressB64.py:93
PtCondition::PtCondition
PtCondition(double threshold)
Definition: PtCondition.cxx:13