ATLAS Offline Software
SMCCondition.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 #
5 #include "./SMCCondition.h"
8 
9 #include <sstream>
10 #include <cmath>
11 #include <TLorentzVector.h>
12 
14  double massMax):
15 m_min(massMin), m_max(massMax){
16 }
17 
18 
19 bool
21  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
22 
23  auto mass = std::abs(ip->m());
24  bool pass = m_min <= mass and m_max > mass;
25 
26  if(collector){
27  const void* address = static_cast<const void*>(this);
28 
29  std::stringstream ss0;
30  ss0 << "SMCCondition: (" << address << ") "
31  << " mass[" << m_min << ", " << m_max << "]"
32  << " pass: " << std::boolalpha << pass << '\n';
33 
34  auto j_addr = static_cast<const void*>(ip.get());
35  std::stringstream ss1;
36  ss1 << " jet : ("<< j_addr << ") jet mass " << mass << '\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 SMCCondition::toString() const {
54  std::stringstream ss;
55  ss << "SMCCondition (" << this << ") mass min "
56  << m_min
57  << " mass max "
58  << m_max
59  <<'\n';
60 
61  return ss.str();
62 }
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SMCCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: SMCCondition.cxx:46
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
IJet.h
SMCCondition::m_max
double m_max
Definition: SMCCondition.h:39
SMCCondition.h
SMCCondition::m_min
double m_min
Definition: SMCCondition.h:38
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
SMCCondition::SMCCondition
SMCCondition(double massMin, double massMax)
Definition: SMCCondition.cxx:13
SMCCondition::toString
std::string toString() const override
Definition: SMCCondition.cxx:53
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
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
python.compressB64.c
def c
Definition: compressB64.py:93