StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DireHooks.h
1 // DireHooks.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Stefan Prestel, Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Header file for Dire user hooks.
7 
8 #ifndef Pythia8_DireHooks_H
9 #define Pythia8_DireHooks_H
10 
11 #include "Pythia8/PythiaStdlib.h"
12 #include "Pythia8/DireSplittings.h"
13 
14 namespace Pythia8 {
15 
16 //==========================================================================
17 
18 // Hooks is base class for user access to program execution.
19 
20 class DireHooks {
21 
22 public:
23 
24  // Destructor.
25  virtual ~DireHooks() {}
26 
27  // Initialize pointers and workEvent. Note: not virtual.
28  void initPtr( Info* infoPtrIn, BeamParticle* beamAPtrIn,
29  BeamParticle* beamBPtrIn) {
30  infoPtr = infoPtrIn;
31  settingsPtr = infoPtr->settingsPtr;
32  particleDataPtr = infoPtr->particleDataPtr;
33  rndmPtr = infoPtr->rndmPtr;
34  beamAPtr = beamAPtrIn;
35  beamBPtr = beamBPtrIn;
36  coupSMPtr = infoPtr->coupSMPtr;
37  partonSystemsPtr = infoPtr->partonSystemsPtr;
38  }
39 
40  // Initialisation after beams have been set by Pythia::init().
41  virtual bool init() { return true; }
42 
43  // Possibility for user-defined splitting kernels.
44  virtual bool canLoadFSRKernels() {return false;}
45  virtual bool doLoadFSRKernels(
46  std::unordered_map< string, DireSplitting* >&) {return false;}
47  virtual bool canLoadISRKernels() {return false;}
48  virtual bool doLoadISRKernels(
49  std::unordered_map< string, DireSplitting* >&) {return false;}
50 
51  // Possibility for user-defined scale setting.
52  virtual bool canSetRenScale() {return false;}
53  virtual bool canSetFacScale() {return false;}
54  virtual bool canSetStartScale() {return false;}
55  virtual double doGetRenScale(double x1, double x2, double sH, double tH,
56  double uH, bool massless, double m1sq, double m2sq, double m3sq,
57  double m4sq) {
58  if (false) cout << x1*x2*sH*tH*uH*massless*m1sq*m2sq*m3sq*m4sq;
59  return -1.0;
60  }
61  virtual double doGetFacScale(double x1, double x2, double sH, double tH,
62  double uH, bool massless, double m1sq, double m2sq, double m3sq,
63  double m4sq) {
64  if (false) cout << x1*x2*sH*tH*uH*massless*m1sq*m2sq*m3sq*m4sq;
65  return -1.0;
66  }
67  virtual double doGetStartScale(double x1, double x2, double sH, double tH,
68  double uH, bool massless, double m1sq, double m2sq, double m3sq,
69  double m4sq) {
70  if (false) cout << x1*x2*sH*tH*uH*massless*m1sq*m2sq*m3sq*m4sq;
71  return -1.0;
72  }
73 
74 protected:
75 
76  // Constructor.
77  DireHooks() : infoPtr(0), settingsPtr(0), particleDataPtr(0), rndmPtr(0),
78  beamAPtr(0), beamBPtr(0), coupSMPtr(0), partonSystemsPtr(0) {}
79 
80  // Pointer to various information on the generation.
81  Info* infoPtr;
82 
83  // Pointer to the settings database.
84  Settings* settingsPtr;
85 
86  // Pointer to the particle data table.
87  ParticleData* particleDataPtr;
88 
89  // Pointer to the random number generator.
90  Rndm* rndmPtr;
91 
92  // Pointers to the two incoming beams and to Pomeron beam-inside-beam.
93  BeamParticle* beamAPtr;
94  BeamParticle* beamBPtr;
95 
96  // Pointers to Standard Model couplings.
97  CoupSM* coupSMPtr;
98 
99  // Pointer to information on subcollision parton locations.
100  PartonSystems* partonSystemsPtr;
101 
102 };
103 
104 //==========================================================================
105 
106 } // end namespace Pythia8
107 
108 #endif // end Pythia8_DireHooks_H