ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
PtCondition.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 "
./PtCondition.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h
"
8
9
#include <sstream>
10
#include <cmath>
11
#include <TLorentzVector.h>
12
13
PtCondition::PtCondition
(
double
threshold
) :
m_min
(
threshold
) {
14
}
15
16
17
bool
PtCondition::isSatisfied
(
const
pHypoJet
& ip,
18
const
std::unique_ptr<ITrigJetHypoInfoCollector>& collector)
const
{
19
auto
pt = ip->pt();
20
bool
pass =
m_min
<= pt;
21
22
if
(collector){
23
const
void
* address =
static_cast<
const
void
*
>
(
this
);
24
25
std::stringstream ss0;
26
ss0 <<
"PtCondition: ("
<< address <<
") "
27
<<
" pt thresh "
<<
m_min
28
<<
" pass: "
<< std::boolalpha << pass <<
'\n'
;
29
30
auto
j_addr =
static_cast<
const
void
*
>
(ip.get());
31
std::stringstream ss1;
32
ss1 <<
" jet : ("
<< j_addr <<
")"
33
" pt "
<< pt <<
'\n'
;
34
35
collector->collect(ss0.str(), ss1.str());
36
37
}
38
return
pass;
39
}
40
41
42
bool
43
PtCondition::isSatisfied
(
const
HypoJetVector
& ips,
44
const
std::unique_ptr<ITrigJetHypoInfoCollector>& c)
const
{
45
auto
result =
isSatisfied
(ips[0], c);
46
return
result;
47
}
48
49
50
std::string
PtCondition::toString
()
const
{
51
std::stringstream
ss
;
52
ss
<<
"PtCondition ("
<<
this
<<
") "
53
<<
" Pt threshold: "
54
<<
m_min
55
<<
'\n'
;
56
57
return
ss
.str();
58
}
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition
HypoJetDefs.h:25
IJet.h
ITrigJetHypoInfoCollector.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
PtCondition.h
PtCondition::toString
std::string toString() const override
Definition
PtCondition.cxx:50
PtCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
PtCondition.cxx:43
PtCondition::PtCondition
PtCondition(double threshold)
Definition
PtCondition.cxx:13
PtCondition::m_min
double m_min
Definition
PtCondition.h:38
threshold
Definition
chainparser.cxx:74
Generated on
for ATLAS Offline Software by
1.17.0