ATLAS Offline Software
EtaConditionAbs.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 "./EtaConditionAbs.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 
19 bool
21  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
22 
23  auto abseta = std::abs(ip->eta());
24  bool pass = m_min <= abseta and m_max > abseta;
25 
26  if(collector){
27  const void* address = static_cast<const void*>(this);
28 
29  std::stringstream ss0;
30  ss0 << "EtaCondition: (" << address << ") "
31  << " eta[" << 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 << ") abseta " << abseta << '\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 EtaConditionAbs::toString() const {
54  std::stringstream ss;
55  ss << "EtaConditionAbs (" << this << ") Capacity: " << s_capacity
56  << " etaMin "<< m_min
57  << " etaMax " << m_max;
58 
59  return ss.str();
60 }
EtaConditionAbs::EtaConditionAbs
EtaConditionAbs(double etaMin, double etaMax)
Definition: EtaConditionAbs.cxx:13
EtaConditionAbs::toString
std::string toString() const override
Definition: EtaConditionAbs.cxx:53
get_generator_info.result
result
Definition: get_generator_info.py:21
EtaConditionAbs.h
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
IJet.h
EtaConditionAbs::s_capacity
static const unsigned int s_capacity
Definition: EtaConditionAbs.h:43
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
ITrigJetHypoInfoCollector::collect
virtual void collect(const std::string &, const std::string &)=0
EtaConditionAbs::m_max
double m_max
Definition: EtaConditionAbs.h:39
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
EtaConditionAbs::m_min
double m_min
Definition: EtaConditionAbs.h:38
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ITrigJetHypoInfoCollector.h
EtaConditionAbs::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition: EtaConditionAbs.cxx:46
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
python.compressB64.c
def c
Definition: compressB64.py:93