ATLAS Offline Software
Loading...
Searching...
No Matches
DipzMLPLCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#include <sstream>
10#include <cmath>
11#include <algorithm>
12#include <numeric>
13
15 unsigned int capacity,
16 const std::string &decName_z,
17 const std::string &decName_negLogSigma2) :
20 m_likelihoodCalculator(decName_z, decName_negLogSigma2)
21{
22
23}
24
26 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
27
28 if(collector){
29 std::stringstream ss0;
30 const void* address = static_cast<const void*>(this);
31 ss0 << "DipzMLPLCondition: (" << address << ") starts\n";
32 collector -> collect(ss0.str(), "");
33 }
34
35 double logproduct = m_likelihoodCalculator(ips);
36
37 bool pass = logproduct >= m_workingPoint;
38
39 if(collector){
40 std::stringstream ss0;
41 const void* address = static_cast<const void*>(this);
42 ss0 << "DipzMLPLCondition: (" << address << ") logproduct term "
43 << logproduct << " >= "
44 << m_workingPoint << ": "
45 << std::boolalpha << pass << " jet group: \n";
46
47 std::stringstream ss1;
48
49 for(const auto& ip : ips){
50 address = static_cast<const void*>(ip.get());
51 ss1 << " " << address << " " << ip->eta() << " e " << ip->e() << '\n';
52 }
53 ss1 << '\n';
54 collector -> collect(ss0.str(), ss1.str());
55 }
56
57 return pass;
58
59}
60
61std::string DipzMLPLCondition::toString() const {
62 std::stringstream ss;
63 const void* address = static_cast<const void*>(this);
64
65 ss << "DipzMLPLCondition: (" << address << ") Capacity: " << m_capacity
66 << " working point: " << m_workingPoint;
67 ss <<'\n';
68
69 return ss.str();
70}
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
static Double_t ss
std::string toString() const override
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
const unsigned int m_capacity
virtual unsigned int capacity() const override
DipzMLPLCondition(double wp, unsigned int capacity, const std::string &decName_z, const std::string &decName_negLogSigma2)
DipzLikelihood m_likelihoodCalculator