StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ShowerModel.cc
1 // ShowerModel.cc is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 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 // Function definitions (not found in the header) for the
7 // ShowerModel class.
8 
9 #include "Pythia8/ShowerModel.h"
10 #include "Pythia8/SimpleTimeShower.h"
11 #include "Pythia8/SimpleSpaceShower.h"
12 #include "Pythia8/Merging.h"
13 #include "Pythia8/MergingHooks.h"
14 
15 namespace Pythia8 {
16 
17 //==========================================================================
18 
19 // Initialize the SimpleShowerModel.
20 
21 bool SimpleShowerModel::init(MergingPtr mergPtrIn,
22  MergingHooksPtr mergHooksPtrIn, PartonVertexPtr,
23  WeightContainer*) {
24  subObjects.clear();
25  mergingPtr = mergPtrIn;
26  if ( mergingPtr ) registerSubObject(*mergingPtr);
27  mergingHooksPtr = mergHooksPtrIn;
28  if ( mergingHooksPtr ) registerSubObject(*mergingHooksPtr);
29  timesPtr = timesDecPtr = make_shared<SimpleTimeShower>();
30  registerSubObject(*timesPtr);
31  spacePtr = make_shared<SimpleSpaceShower>();
32  registerSubObject(*spacePtr);
33  return true;
34 }
35 
36 //==========================================================================
37 
38 } // end namespace Pythia8