ATLAS Offline Software
EtaConditionSigned.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 "./EtaConditionSigned.h"
8 
9 #include <sstream>
10 #include <cmath>
11 #include <TLorentzVector.h>
12 
14  double etaMax):
15 m_min(etaMin), m_max(etaMax){
16 }
17 
18 
20  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
21 
22  auto eta = ip->eta();
23  bool pass = m_min <= eta and m_max > eta;
24 
25  if(collector){
26  const void* address = static_cast<const void*>(this);
27 
28  std::stringstream ss0;
29  ss0 << "EtaCondition: (" << address << ") "
30  << " eta[" << 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 << ") signed eta " << eta << '\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 EtaConditionSigned::toString() const {
53  std::stringstream ss;
54  ss << "EtaConditionSigned (" << this << ") etaMin "
55  << m_min
56  << " etaMax "
57  << m_max
58  <<'\n';
59 
60  return ss.str();
61 }
EtaConditionSigned::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: EtaConditionSigned.cxx:45
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
IJet.h
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
EtaConditionSigned::m_min
double m_min
Definition: EtaConditionSigned.h:39
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
EtaConditionSigned.h
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition: HypoJetDefs.h:25
EtaConditionSigned::m_max
double m_max
Definition: EtaConditionSigned.h:40
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
EtaConditionSigned::toString
std::string toString() const override
Definition: EtaConditionSigned.cxx:52
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
python.compressB64.c
def c
Definition: compressB64.py:93
EtaConditionSigned::EtaConditionSigned
EtaConditionSigned(double etaMin, double etaMax)
Definition: EtaConditionSigned.cxx:13