ATLAS Offline Software
Loading...
Searching...
No Matches
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"
8#include <stdexcept>
9#include <iostream>
10
11namespace Pythia8{
12 class SuppressMPI;
13}
14
16
17namespace Pythia8{
18
19 class SuppressMPI : public UserHooks{
20
21 public:
22
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
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;}
71 bool canVetoISREmission(){return false;}
73 bool canVetoFSREmission(){return false;}
74
75 private:
76
78
80
81
82 };
83
84
85
86}
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::SuppressMPI > SuppressMPICreator("SuppressMPI")
Pythia8_UserHooks::UserSetting< double > m_pTCut
int numberVetoMPIStep()
Call doVetoMIStep three times First is the hard process second is first MPI emission or the second pa...
bool canVetoISREmission()
Switch on veto of ISR.
bool canVetoMPIStep()
Switch on calling of doVetoMPIStep.
bool doVetoMPIStep(int nMPI, const Event &event)
bool canVetoFSREmission()
Switch off veto of FSR.
Author: James Monk (jmonk@cern.ch)