ATLAS Offline Software
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 
11 namespace Pythia8{
12  class SuppressMPI;
13 }
14 
16 
17 namespace 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::SuppressMPI::canVetoISREmission
bool canVetoISREmission()
Switch on veto of ISR.
Definition: SuppressMPI.cxx:71
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
Pythia8::SuppressMPI::canVetoFSREmission
bool canVetoFSREmission()
Switch off veto of FSR.
Definition: SuppressMPI.cxx:73
Pythia8::SuppressMPI::SuppressMPI
SuppressMPI()
Definition: SuppressMPI.cxx:23
Event
Definition: trigbs_orderedMerge.cxx:42
Pythia8::SuppressMPI::doVetoMPIStep
bool doVetoMPIStep(int nMPI, const Event &event)
Definition: SuppressMPI.cxx:36
Pythia8_UserHooks::UserHooksFactory::Creator
Definition: UserHooksFactory.h:54
UserHooksFactory.h
Pythia8::SuppressMPI::~SuppressMPI
~SuppressMPI()
Definition: SuppressMPI.cxx:34
Pythia8
Author: James Monk (jmonk@cern.ch)
Definition: IPythia8Custom.h:13
Pythia8_UserHooks::UserSetting< double >
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Pythia8::SuppressMPI::canVetoMPIStep
bool canVetoMPIStep()
Switch on calling of doVetoMPIStep.
Definition: SuppressMPI.cxx:60
UserSetting.h
Pythia8::SuppressMPI::m_nMPIVeto
int m_nMPIVeto
Definition: SuppressMPI.cxx:79
Pythia8::SuppressMPI::m_pTCut
Pythia8_UserHooks::UserSetting< double > m_pTCut
Definition: SuppressMPI.cxx:77
UserHooksUtils.h
SuppressMPICreator
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::SuppressMPI > SuppressMPICreator("SuppressMPI")
Pythia8::SuppressMPI
Definition: SuppressMPI.cxx:19
merge.status
status
Definition: merge.py:17
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