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