ATLAS Offline Software
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"
8 #include "./DebugInfoCollector.h"
9 
10 #include <sstream>
11 #include <cmath>
12 #include <TLorentzVector.h>
13 
15 }
16 
17 
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
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 }
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
EMFCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: EMFCondition.cxx:46
IJet.h
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
EMFCondition::m_min
double m_min
Definition: EMFCondition.h:38
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition: HypoJetDefs.h:25
EMFCondition.h
DebugInfoCollector.h
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
threshold
Definition: chainparser.cxx:74
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
EMFCondition::EMFCondition
EMFCondition(double threshold)
Definition: EMFCondition.cxx:14
python.compressB64.c
def c
Definition: compressB64.py:93
EMFCondition::toString
std::string toString() const override
Definition: EMFCondition.cxx:53