ATLAS Offline Software
Loading...
Searching...
No Matches
PtCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#
5#include "./PtCondition.h"
8
9#include <sstream>
10#include <cmath>
11#include <TLorentzVector.h>
12
15
16
18 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
19 auto pt = ip->pt();
20 bool pass = m_min <= pt;
21
22 if(collector){
23 const void* address = static_cast<const void*>(this);
24
25 std::stringstream ss0;
26 ss0 << "PtCondition: (" << address << ") "
27 << " pt thresh " << m_min
28 << " pass: " << std::boolalpha << pass << '\n';
29
30 auto j_addr = static_cast<const void*>(ip.get());
31 std::stringstream ss1;
32 ss1 << " jet : ("<< j_addr << ")"
33 " pt " << pt << '\n';
34
35 collector->collect(ss0.str(), ss1.str());
36
37 }
38 return pass;
39}
40
41
42bool
44 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
45 auto result = isSatisfied(ips[0], c);
46 return result;
47}
48
49
50std::string PtCondition::toString() const {
51 std::stringstream ss;
52 ss << "PtCondition (" << this << ") "
53 << " Pt threshold: "
54 << m_min
55 <<'\n';
56
57 return ss.str();
58}
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
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
PtCondition(double threshold)
double m_min
Definition PtCondition.h:38