ATLAS Offline Software
SettableColourReconnection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
5 #include "Pythia8Plugins/ColourReconnectionHooks.h"
6 #include "UserSetting.h"
7 
8 namespace Pythia8{
9 
10  class SettableColourReconnectionBase : public UserHooks{
11 
12  public:
13 
15 
17  if(m_crHook != 0) delete m_crHook;
18  }
19 
20  // Allow colour reconnection after resonance decays (early or late)...
21  bool canReconnectResonanceSystems() {return true;}
22 
23  bool doReconnectResonanceSystems(int oldSizeEvent, Event& event) {
24 
25  if(m_crHook == 0){
26  _init();
28 
29  }
30  return m_crHook->doReconnectResonanceSystems(oldSizeEvent, event);
31  }
32 
33  protected:
34 
35  virtual void _init() = 0;
36 
37  UserHooks *m_crHook;
38 
39 
40  };
42  // Minimum bias colour reconnection hook
44 
45  public:
47  m_modeIn("MBReconnection:Mode", 0),
48  m_flipIn("MBReconnection:Flip", 0),
49  m_dLamCutIn("MBReconnection:DeltaLambda", 0.),
50  m_fracGluonIn("MBReconnection:GluonFraction", 1.){}
51 
52  protected:
53 
54  void _init(){
55  if(m_crHook != 0) return;
56  m_crHook = new MBReconUserHooks(m_modeIn(settingsPtr), m_flipIn(settingsPtr), m_dLamCutIn(settingsPtr), m_fracGluonIn(settingsPtr));
57  return;
58  }
59 
60  private:
61 
66 
67  };
68 
70  // Top colour reconnection hook
72 
73  public:
75  m_modeIn("TopReconnection:Mode", 0),
76  m_strengthIn("TopReconnection:Strength", 1){
77  std::cout << "**********************************************************" << std::endl;
78  std::cout << "* *" << std::endl;
79  std::cout << "* Using TopReconUserHooks *" << std::endl;
80  std::cout << "* See first ATHENA implementation study here: *" << std::endl;
81  std::cout << "* https://its.cern.ch/jira/browse/ATLMCPROD-9367 *" << std::endl;
82  std::cout << "* *" << std::endl;
83  std::cout << "**********************************************************" << std::endl;
84  }
85 
86  protected:
87 
88  void _init(){
89  if(m_crHook != 0) return;
90  m_crHook = new TopReconUserHooks(m_modeIn(settingsPtr), m_strengthIn(settingsPtr));
91  return;
92  }
93 
94  private:
95 
98 
99  };
100 
101 
102 }
103 
Pythia8::SettableColourReconnectionBase::m_crHook
UserHooks * m_crHook
Definition: SettableColourReconnection.cxx:37
settableTopColourReconnectionCreator
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::SettableTopColourReconnection > settableTopColourReconnectionCreator("TopReconUserHooks")
Pythia8::SettableTopColourReconnection::m_modeIn
Pythia8_UserHooks::UserSetting< int > m_modeIn
Definition: SettableColourReconnection.cxx:96
Pythia8::SettableMBColourReconnection::m_dLamCutIn
Pythia8_UserHooks::UserSetting< double > m_dLamCutIn
Definition: SettableColourReconnection.cxx:64
Pythia8::SettableMBColourReconnection::SettableMBColourReconnection
SettableMBColourReconnection()
Definition: SettableColourReconnection.cxx:46
Event
Definition: trigbs_orderedMerge.cxx:42
Pythia8::SettableTopColourReconnection::_init
void _init()
Definition: SettableColourReconnection.cxx:88
Pythia8::SettableColourReconnectionBase::~SettableColourReconnectionBase
virtual ~SettableColourReconnectionBase()
Definition: SettableColourReconnection.cxx:16
Pythia8_UserHooks::UserHooksFactory::Creator
Definition: UserHooksFactory.h:54
UserHooksFactory.h
Pythia8::SettableTopColourReconnection::SettableTopColourReconnection
SettableTopColourReconnection()
Definition: SettableColourReconnection.cxx:74
Pythia8
Author: James Monk (jmonk@cern.ch)
Definition: IPythia8Custom.h:13
Pythia8_UserHooks::UserSetting< int >
Pythia8::SettableTopColourReconnection
Definition: SettableColourReconnection.cxx:71
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Pythia8::SettableColourReconnectionBase
Definition: SettableColourReconnection.cxx:10
Pythia8::SettableMBColourReconnection::m_flipIn
Pythia8_UserHooks::UserSetting< int > m_flipIn
Definition: SettableColourReconnection.cxx:63
Pythia8::SettableMBColourReconnection::_init
void _init()
Definition: SettableColourReconnection.cxx:54
Pythia8::SettableMBColourReconnection
Definition: SettableColourReconnection.cxx:43
Pythia8::SettableColourReconnectionBase::SettableColourReconnectionBase
SettableColourReconnectionBase()
Definition: SettableColourReconnection.cxx:14
UserSetting.h
Pythia8::SettableMBColourReconnection::m_fracGluonIn
Pythia8_UserHooks::UserSetting< double > m_fracGluonIn
Definition: SettableColourReconnection.cxx:65
PYTHIA8_INITUSERHOOK_WRAP
#define PYTHIA8_INITUSERHOOK_WRAP(A)
Definition: UserHooksFactory.h:15
Pythia8::SettableTopColourReconnection::m_strengthIn
Pythia8_UserHooks::UserSetting< double > m_strengthIn
Definition: SettableColourReconnection.cxx:97
Pythia8::SettableColourReconnectionBase::doReconnectResonanceSystems
bool doReconnectResonanceSystems(int oldSizeEvent, Event &event)
Definition: SettableColourReconnection.cxx:23
Pythia8::SettableColourReconnectionBase::_init
virtual void _init()=0
settableMBColourReconnectionCreator
Pythia8_UserHooks::UserHooksFactory::Creator< Pythia8::SettableMBColourReconnection > settableMBColourReconnectionCreator("MBReconUserHooks_Unvalidated")
Pythia8::SettableMBColourReconnection::m_modeIn
Pythia8_UserHooks::UserSetting< int > m_modeIn
Definition: SettableColourReconnection.cxx:62
Pythia8::SettableColourReconnectionBase::canReconnectResonanceSystems
bool canReconnectResonanceSystems()
Definition: SettableColourReconnection.cxx:21