ATLAS Offline Software
Loading...
Searching...
No Matches
EnhanceMPI.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 EnhanceMPI;
13}
14
16
17namespace Pythia8{
18
19 class EnhanceMPI : public UserHooks{
20
21 public:
22
23 EnhanceMPI(): m_pTCut("EnhanceMPI:PTCut", 10.), m_nMPIVeto(3){
24
25 std::cout<<"**********************************************************"<<std::endl;
26 std::cout<<"* *"<<std::endl;
27 std::cout<<"* Enhancing MPI emissions with UserHook! *"<<std::endl;
28 std::cout<<"* *"<<std::endl;
29 std::cout<<"**********************************************************"<<std::endl;
30
31 m_passedEvent = 0;
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 m_passedEvent = false;
41 return false;
42 }
43
44 if(m_passedEvent) return false;
45
46 // start at the end of the event record and work back
47 // This is prior to showering, so there should be at most 2 new MPI emissions
48 // event[0] is documentation, so stop before that.
49 size_t nEmissions=0;
50 for(int ii=event.size()-1; ii > 0 && nEmissions != 2; --ii){
51 if(event[ii].status() != 33) continue;
52 if(event[ii].pT() > m_pTCut(settingsPtr)){
53 m_passedEvent = true;
54 return false;
55 }
56
57 ++nEmissions;
58 }
59
60 if(nMPI == m_nMPIVeto && !m_passedEvent){
61 // std::cout<<"Vetoing event on too-little MPI"<<std::endl;
62 return true;
63 }
64
65 return false;
66 }
67
69 if(m_passedEvent) return false;
70
71 return true;
72 }
73
75 bool canVetoMPIStep(){return true;}
86 bool canVetoISREmission(){return false;}
88 bool canVetoFSREmission(){return false;}
90 bool canVetoPartonLevel(){return true;}
91
92 private:
93
95
97
99
100 };
101
102
103
104}
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::EnhanceMPI > EnhanceMPICreator("EnhanceMPI")
bool canVetoPartonLevel()
Check the event after the generation of the parton level but before hadronisation.
bool canVetoFSREmission()
Switch off veto of FSR.
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.
Pythia8_UserHooks::UserSetting< double > m_pTCut
bool doVetoMPIStep(int nMPI, const Event &event)
bool doVetoPartonLevel(const Event &)
Author: James Monk (jmonk@cern.ch)