ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
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
5
#include "
./DipzMLPLCondition.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h
"
8
9
#include <sstream>
10
#include <cmath>
11
#include <algorithm>
12
#include <numeric>
13
14
DipzMLPLCondition::DipzMLPLCondition
(
double
wp,
15
unsigned
int
capacity
,
16
const
std::string &decName_z,
17
const
std::string &decName_negLogSigma2) :
18
m_workingPoint
(wp),
19
m_capacity
(
capacity
),
20
m_likelihoodCalculator
(decName_z, decName_negLogSigma2)
21
{
22
23
}
24
25
bool
DipzMLPLCondition::isSatisfied
(
const
HypoJetVector
& ips,
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
61
std::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
}
DipzMLPLCondition.h
HypoJetDefs.h
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
ITrigJetHypoInfoCollector.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
DipzMLPLCondition::m_workingPoint
double m_workingPoint
Definition
DipzMLPLCondition.h:46
DipzMLPLCondition::toString
std::string toString() const override
Definition
DipzMLPLCondition.cxx:61
DipzMLPLCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
DipzMLPLCondition.cxx:25
DipzMLPLCondition::m_capacity
const unsigned int m_capacity
Definition
DipzMLPLCondition.h:47
DipzMLPLCondition::capacity
virtual unsigned int capacity() const override
Definition
DipzMLPLCondition.h:42
DipzMLPLCondition::DipzMLPLCondition
DipzMLPLCondition(double wp, unsigned int capacity, const std::string &decName_z, const std::string &decName_negLogSigma2)
Definition
DipzMLPLCondition.cxx:14
DipzMLPLCondition::m_likelihoodCalculator
DipzLikelihood m_likelihoodCalculator
Definition
DipzMLPLCondition.h:51
Generated on
for ATLAS Offline Software by
1.17.0