ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
Pythia8_i
src
UserHooks
SuppressMPI.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
UserHooksUtils.h
"
6
#include "
UserSetting.h
"
7
#include "
Pythia8_i/UserHooksFactory.h
"
8
#include <stdexcept>
9
#include <iostream>
10
11
namespace
Pythia8
{
12
class
SuppressMPI
;
13
}
14
15
Pythia8_UserHooks::UserHooksFactory::Creator<Pythia8::SuppressMPI>
SuppressMPICreator
(
"SuppressMPI"
);
16
17
namespace
Pythia8
{
18
19
class
SuppressMPI
:
public
UserHooks{
20
21
public
:
22
23
SuppressMPI
():
24
m_pTCut
(
"SuppressMPI:PTCut"
, 10.),
m_nMPIVeto
(3){
25
26
std::cout<<
"************************************************************"
<<std::endl;
27
std::cout<<
"* *"
<<std::endl;
28
std::cout<<
"* Suppressing MPI emissions with UserHook! *"
<<std::endl;
29
std::cout<<
"* *"
<<std::endl;
30
std::cout<<
"************************************************************"
<<std::endl;
31
32
}
33
34
~SuppressMPI
(){}
35
36
bool
doVetoMPIStep
(
int
nMPI,
const
Event
&event){
37
38
// MPI 1 is the hard process. We do not veto that!
39
if
(nMPI < 2){
40
return
false
;
41
}
42
43
// start at the end of the event record and work back
44
// This is prior to showering, so there should be at most 2 new MPI emissions
45
// event[0] is documentation, so stop before that.
46
size_t
nEmissions=0;
47
for
(
int
ii=event.size()-1; ii > 0 && nEmissions != 2; --ii){
48
if
(event[ii].status() != 33)
continue
;
49
if
(event[ii].pT() >
m_pTCut
(settingsPtr)){
50
return
true
;
51
}
52
53
++nEmissions;
54
}
55
56
return
false
;
57
}
58
60
bool
canVetoMPIStep
(){
return
true
;}
69
int
numberVetoMPIStep
(){
return
m_nMPIVeto
;}
71
bool
canVetoISREmission
(){
return
false
;}
73
bool
canVetoFSREmission
(){
return
false
;}
74
75
private
:
76
77
Pythia8_UserHooks::UserSetting<double>
m_pTCut
;
78
79
int
m_nMPIVeto
;
80
81
82
};
83
84
85
86
}
SuppressMPICreator
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::SuppressMPI > SuppressMPICreator("SuppressMPI")
UserHooksFactory.h
UserHooksUtils.h
UserSetting.h
Pythia8::SuppressMPI
Definition
SuppressMPI.cxx:19
Pythia8::SuppressMPI::m_pTCut
Pythia8_UserHooks::UserSetting< double > m_pTCut
Definition
SuppressMPI.cxx:77
Pythia8::SuppressMPI::numberVetoMPIStep
int numberVetoMPIStep()
Call doVetoMIStep three times First is the hard process second is first MPI emission or the second pa...
Definition
SuppressMPI.cxx:69
Pythia8::SuppressMPI::m_nMPIVeto
int m_nMPIVeto
Definition
SuppressMPI.cxx:79
Pythia8::SuppressMPI::~SuppressMPI
~SuppressMPI()
Definition
SuppressMPI.cxx:34
Pythia8::SuppressMPI::canVetoISREmission
bool canVetoISREmission()
Switch on veto of ISR.
Definition
SuppressMPI.cxx:71
Pythia8::SuppressMPI::canVetoMPIStep
bool canVetoMPIStep()
Switch on calling of doVetoMPIStep.
Definition
SuppressMPI.cxx:60
Pythia8::SuppressMPI::doVetoMPIStep
bool doVetoMPIStep(int nMPI, const Event &event)
Definition
SuppressMPI.cxx:36
Pythia8::SuppressMPI::SuppressMPI
SuppressMPI()
Definition
SuppressMPI.cxx:23
Pythia8::SuppressMPI::canVetoFSREmission
bool canVetoFSREmission()
Switch off veto of FSR.
Definition
SuppressMPI.cxx:73
Pythia8_UserHooks::UserHooksFactory::Creator
Definition
UserHooksFactory.h:54
Pythia8_UserHooks::UserSetting
Definition
UserSetting.h:17
Pythia8
Author: James Monk (jmonk@cern.ch).
Definition
IPythia8Custom.h:10
Event
Definition
trigbs_orderedMerge.cxx:42
Generated on
for ATLAS Offline Software by
1.17.0