ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
PhiCondition.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
#
5
#include "
./PhiCondition.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h
"
8
9
#include <sstream>
10
#include <cmath>
11
#include <TLorentzVector.h>
12
13
PhiCondition::PhiCondition
(
double
phiMin,
14
double
phiMax):
m_min
(phiMin),
m_max
(phiMax){
15
}
16
17
18
bool
19
PhiCondition::isSatisfied
(
const
pHypoJet
& ip,
20
const
std::unique_ptr<ITrigJetHypoInfoCollector>& collector)
const
{
21
22
auto
phi
= ip->phi();
23
bool
pass =
m_min <= phi and m_max >
phi
;
24
25
if
(collector){
26
const
void
* address =
static_cast<
const
void
*
>
(
this
);
27
28
std::stringstream ss0;
29
ss0 <<
"PhiCondition: ("
<< address <<
") "
30
<<
" phi["
<<
m_min
<<
", "
<<
m_max
<<
"]"
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 <<
") phi "
<<
phi
<<
'\n'
;
36
37
collector->collect(ss0.str(), ss1.str());
38
39
}
40
return
pass;
41
}
42
43
44
bool
45
PhiCondition::isSatisfied
(
const
HypoJetVector
& ips,
46
const
std::unique_ptr<ITrigJetHypoInfoCollector>& c)
const
{
47
auto
result =
isSatisfied
(ips[0], c);
48
return
result;
49
}
50
51
52
std::string
PhiCondition::toString
()
const
{
53
std::stringstream
ss
;
54
ss
<<
"PhiCondition ("
<<
this
<<
") phiMin "
55
<<
m_min
56
<<
" phiMax "
57
<<
m_max
58
<<
'\n'
;
59
60
return
ss
.str();
61
}
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
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
PhiCondition.h
PhiCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
PhiCondition.cxx:45
PhiCondition::m_max
double m_max
Definition
PhiCondition.h:40
PhiCondition::PhiCondition
PhiCondition(double phiMin, double phiMax)
Definition
PhiCondition.cxx:13
PhiCondition::toString
std::string toString() const override
Definition
PhiCondition.cxx:52
PhiCondition::m_min
double m_min
Definition
PhiCondition.h:39
Generated on
for ATLAS Offline Software by
1.17.0