ATLAS Offline Software
PhiCondition.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #
5 #include "./PhiCondition.h"
8 
9 #include <sstream>
10 #include <cmath>
11 #include <TLorentzVector.h>
12 
14  double phiMax): m_min(phiMin), m_max(phiMax){
15 }
16 
17 
18 bool
20  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
21 
22  auto phi = ip->phi();
23  bool pass = m_min <= phi and m_max > phi;
24 
25  if(collector){
26  const void* address = static_cast<const void*>(this);
27 
28  std::stringstream ss0;
29  ss0 << "PhiCondition: (" << address << ") "
30  << " phi[" << m_min << ", " << m_max << "]"
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 << ") phi " << phi << '\n';
36 
37  collector->collect(ss0.str(), ss1.str());
38 
39  }
40  return pass;
41 }
42 
43 
44 bool
46  const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
47  auto result = isSatisfied(ips[0], c);
48  return result;
49 }
50 
51 
52 std::string PhiCondition::toString() const {
53  std::stringstream ss;
54  ss << "PhiCondition (" << this << ") phiMin "
55  << m_min
56  << " phiMax "
57  << m_max
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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
IJet.h
PhiCondition::PhiCondition
PhiCondition(double phiMin, double phiMax)
Definition: PhiCondition.cxx:13
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
PhiCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: PhiCondition.cxx:45
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
PhiCondition::toString
std::string toString() const override
Definition: PhiCondition.cxx:52
PhiCondition.h
PhiCondition::m_min
double m_min
Definition: PhiCondition.h:39
python.compressB64.c
def c
Definition: compressB64.py:93
PhiCondition::m_max
double m_max
Definition: PhiCondition.h:40