ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
DijetDPhiCondition.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
./DijetDPhiCondition.h
"
6
#include "
./ITrigJetHypoInfoCollector.h
"
7
#include <sstream>
8
#include <stdexcept>
9
#include <TLorentzVector.h>
10
#include <limits>
11
#include <memory>
12
13
DijetDPhiCondition::DijetDPhiCondition
(
double
min
,
14
double
max
) :
15
m_min
(
min
),
m_max
(
max
) {
16
}
17
18
19
bool
20
DijetDPhiCondition::isSatisfied
(
const
HypoJetVector
& ips,
21
const
std::unique_ptr<ITrigJetHypoInfoCollector>& collector)
const
{
22
23
if
(ips.size() != 2){
24
std::stringstream
ss
;
25
ss
<<
"Dijet::isSatisfied must see exactly 2 particles, but received "
26
<< ips.size()
27
<<
'\n'
;
28
29
throw
std::runtime_error(
ss
.str());
30
}
31
32
auto
j0 = ips[0];
33
auto
j1 = ips[1];
34
35
auto
rj0 = j0 -> p4();
36
auto
rj1 = j1 -> p4();
37
38
auto
dphi = std::abs(rj0.DeltaPhi(rj1));
39
40
41
bool
pass = dphi >=
m_min
and dphi <
m_max
;
42
43
44
if
(collector){
45
std::stringstream ss0;
46
const
void
* address =
static_cast<
const
void
*
>
(
this
);
47
ss0 <<
"DijetDPhiCondition: ("
<< address <<
") dphi "
48
<< dphi <<
" pass: "
<<std::boolalpha << pass <<
" jet group: \n"
;
49
50
std::stringstream ss1;
51
52
for
(
const
auto
& ip : ips){
53
address =
static_cast<
const
void
*
>
(ip.get());
54
ss1 <<
" "
<< address <<
" "
<< ip->eta() <<
" e "
<< ip->e() <<
'\n'
;
55
}
56
ss1 <<
'\n'
;
57
collector -> collect(ss0.str(), ss1.str());
58
}
59
return
pass;
60
61
}
62
63
std::string
DijetDPhiCondition::toString
()
const
{
64
65
66
std::stringstream
ss
;
67
const
void
* address =
static_cast<
const
void
*
>
(
this
);
68
69
ss
<<
"DijetDPhiCondition: ("
<< address <<
") Capacity: "
<<
s_capacity
70
<<
" dPhi min: "
<<
m_min
<<
" dPhi max: "
<<
m_max
<<
'\n'
;
71
72
return
ss
.str();
73
}
DijetDPhiCondition.h
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
ITrigJetHypoInfoCollector.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
min
#define min(a, b)
Definition
cfImp.cxx:40
max
#define max(a, b)
Definition
cfImp.cxx:41
DijetDPhiCondition::s_capacity
static const unsigned int s_capacity
Definition
DijetDPhiCondition.h:48
DijetDPhiCondition::DijetDPhiCondition
DijetDPhiCondition(double detaMin, double detaMax)
Definition
DijetDPhiCondition.cxx:13
DijetDPhiCondition::toString
std::string toString() const override
Definition
DijetDPhiCondition.cxx:63
DijetDPhiCondition::m_max
double m_max
Definition
DijetDPhiCondition.h:46
DijetDPhiCondition::isSatisfied
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
Definition
DijetDPhiCondition.cxx:20
DijetDPhiCondition::m_min
double m_min
Definition
DijetDPhiCondition.h:45
Generated on
for ATLAS Offline Software by
1.17.0