ATLAS Offline Software
Loading...
Searching...
No Matches
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):
15m_min(etaMin), m_max(etaMax){
16}
17
18
19bool
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
45bool
47 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
48 auto result = isSatisfied(ips[0], c);
49 return result;
50}
51
52
53std::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}
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
EtaConditionAbs(double etaMin, double etaMax)
static const unsigned int s_capacity
std::string toString() const override
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override