ATLAS Offline Software
Loading...
Searching...
No Matches
EMFCondition.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 "./EMFCondition.h"
9
10#include <sstream>
11#include <cmath>
12#include <TLorentzVector.h>
13
16
17
19 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
20
21 float emf =999;
22 ip->getAttribute("EMFrac",emf);
23 bool pass = m_min >= emf;
24
25 if(collector){
26 const void* address = static_cast<const void*>(this);
27
28 std::stringstream ss0;
29 ss0 << "EMFCondition: (" << address << ") "
30 << " emf thresh " << m_min
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 << ")"
36 " emf " << emf << '\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 EMFCondition::toString() const {
54 std::stringstream ss;
55 ss << "EMFCondition (" << this << ") "
56 << " EMF threshold: "
57 << m_min
58 <<'\n';
59
60 return ss.str();
61}
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
EMFCondition(double threshold)