ATLAS Offline Software
Loading...
Searching...
No Matches
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#
8
9#include <sstream>
10#include <cmath>
11#include <TLorentzVector.h>
12
14 double etaMax):
15m_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
44bool
46 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
47 auto result = isSatisfied(ips[0], c);
48 return result;
49}
50
51
52std::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}
Scalar eta() const
pseudorapidity method
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
std::string toString() const override
EtaConditionSigned(double etaMin, double etaMax)
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override