ATLAS Offline Software
Loading...
Searching...
No Matches
SpecifiedJetsCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4#
8
9#include <sstream>
10#include <cmath>
11#include <TLorentzVector.h>
12
16
17bool
19 const HypoJetVector& group,
20 const std::unique_ptr<ITrigJetHypoInfoCollector>&) const {
21
22 for(const auto& j : ips){
23 if(std::find(group.begin(), group.end(), j) == group.end()){
24 return false;
25 }
26 }
27
28 return true;
29}
30
31bool
33 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
34 for(const auto& jg : m_acceptedJetGroups){
35 if(groupIsSatisfied(ips, jg, collector)){
36 return true;
37 }
38 }
39 return false;
40}
41
42
43
45 std::stringstream ss;
46 ss << "SpecifiedJetsCondition (" << this << ") accepted jet groupds: ";
47 std::size_t count{0};
48 for(const auto& jg : m_acceptedJetGroups){
49 ss << "group " << count << '\n';
50 ++count;
51 for(const auto& j : jg){
52 auto j_addr = static_cast<const void*>(j.get());
53 ss << j_addr << " ";
54 }
55 }
56 ss << '\n';
57 return ss.str();
58}
std::vector< HypoJetVector > HypoJetGroupVector
Definition HypoJetDefs.h:35
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
static Double_t ss
bool groupIsSatisfied(const HypoJetVector &ips, const HypoJetVector &group, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const
SpecifiedJetsCondition(const HypoJetGroupVector &)
HypoJetGroupVector m_acceptedJetGroups
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
std::string toString() const noexcept override
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146