ATLAS Offline Software
Loading...
Searching...
No Matches
PhiCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4#
5#include "./PhiCondition.h"
8
9#include <sstream>
10#include <cmath>
11#include <TLorentzVector.h>
12
14 double phiMax): m_min(phiMin), m_max(phiMax){
15}
16
17
18bool
20 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
21
22 auto phi = ip->phi();
23 bool pass = m_min <= phi and m_max > phi;
24
25 if(collector){
26 const void* address = static_cast<const void*>(this);
27
28 std::stringstream ss0;
29 ss0 << "PhiCondition: (" << address << ") "
30 << " phi[" << 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 << ") phi " << phi << '\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 PhiCondition::toString() const {
53 std::stringstream ss;
54 ss << "PhiCondition (" << this << ") phiMin "
55 << m_min
56 << " phiMax "
57 << m_max
58 <<'\n';
59
60 return ss.str();
61}
Scalar phi() const
phi method
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
PhiCondition(double phiMin, double phiMax)
std::string toString() const override