Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Generators
Pythia8_i
src
Pythia8Custom
CheckForFinalPartons.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 "
CheckForFinalPartons.h
"
6
7
CheckForFinalPartons::CheckForFinalPartons
(
const
std::string &
type
,
const
std::string &
name
,
const
IInterface *
parent
):
8
AthAlgTool
(
type
,
name
,
parent
), m_nFailures(0){
9
declareInterface<IPythia8Custom>(
this
);
10
declareProperty
(
"MaxFailures"
,
m_maxFailures
=5);
11
}
12
13
14
StatusCode
CheckForFinalPartons::ModifyPythiaEvent
(
Pythia8::Pythia
&pythia)
const
{
15
16
bool
status
=
true
;
17
while
( !(
acceptEvent
(pythia.event) &&
status
) &&
m_nFailures
<=
m_maxFailures
){
18
status
= pythia.next();
19
++
m_nFailures
;
20
ATH_MSG_WARNING
(
"Event rejected due to unhadronised partons"
);
21
ATH_MSG_WARNING
(
"Events rejected so far: "
<<
m_nFailures
<<
" (limit "
<<
m_maxFailures
<<
")"
);
22
}
23
24
if
(
m_nFailures
>
m_maxFailures
){
25
ATH_MSG_ERROR
(
"Too many failures due to unhadronised partons in a single job."
);
26
ATH_MSG_ERROR
(
"Maximum allowed failures per job = "
<<
m_maxFailures
);
27
return
StatusCode::FAILURE;
28
}
29
30
return
StatusCode::SUCCESS;
31
}
32
33
34
bool
CheckForFinalPartons::acceptEvent
(
Pythia8::Event
&
event
)
const
{
35
36
for
(
int
ii=0; ii !=
event
.size(); ++ii){
37
38
if
(!
event
[ii].isFinal())
continue
;
39
40
if
(abs(
event
[ii].
id
()) < 7 ||
event
[ii].
id
() == 21 )
return
false
;
41
42
}
43
44
return
true
;
45
}
46
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
CheckForFinalPartons::ModifyPythiaEvent
StatusCode ModifyPythiaEvent(Pythia8::Pythia &pythia) const override
Update the pythia event.
Definition:
CheckForFinalPartons.cxx:14
JiveXML::Event
struct Event_t Event
Definition:
ONCRPCServer.h:65
bTosllAli.Pythia
Pythia
Definition:
bTosllAli.py:46
CheckForFinalPartons::acceptEvent
bool acceptEvent(Pythia8::Event &event) const
Definition:
CheckForFinalPartons.cxx:34
python.CaloAddPedShiftConfig.type
type
Definition:
CaloAddPedShiftConfig.py:42
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
CheckForFinalPartons::CheckForFinalPartons
CheckForFinalPartons(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
CheckForFinalPartons.cxx:7
CheckForFinalPartons::m_maxFailures
int m_maxFailures
Definition:
CheckForFinalPartons.h:25
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
CheckForFinalPartons.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition:
AthMsgStreamMacros.h:32
merge.status
status
Definition:
merge.py:17
AthAlgTool
Definition:
AthAlgTool.h:26
CheckForFinalPartons::m_nFailures
int m_nFailures
Definition:
CheckForFinalPartons.h:26
Generated on Sat Mar 29 2025 21:08:22 for ATLAS Offline Software by
1.8.18