Belle II Software  release-05-02-19
KoralW.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* Belle 2 headers. */
14 #include <mdst/dataobjects/MCParticleGraph.h>
15 
16 /* ROOT headers. */
17 #include <TLorentzRotation.h>
18 
19 /* C++ headers. */
20 #include <string>
21 
22 namespace Belle2 {
31  class KoralW {
32 
33  public:
34 
36  KoralW() :
37  m_crossSection(0.0),
40  m_seed1(900000000),
41  m_seed2(10000),
42  m_seed3(1000)
43  {for (int i = 0; i < m_numXPar; i++) m_XPar[i] = 0.0;}
44 
45 
47  ~KoralW() {};
48 
52  void setCMSEnergy(double cmsEnergy) { m_cmsEnergy = cmsEnergy; }
53 
59  void init(const std::string& dataPath, const std::string& userDataFile);
60 
66  void generateEvent(MCParticleGraph& mcGraph, TVector3 vertex, TLorentzRotation boost);
67 
72  void term();
73 
77  double getCrossSection() { return m_crossSection; }
78 
82  double getCrossSectionError() { return m_crossSectionError; }
83 
84 
85  protected:
86 
87  double m_crossSection;
89  double m_crossSectionError;
91  double m_cmsEnergy;
102  void storeParticle(MCParticleGraph& mcGraph, const float* mom, const float* vtx, int pdg, TVector3 vertex, TLorentzRotation boost,
103  bool isVirtual = false, bool isInitial = false);
104 
105  private:
106 
107  static constexpr int m_numXPar = 10000;
109  double m_XPar[m_numXPar];
111  unsigned int m_seed1;
113  unsigned int m_seed2;
115  unsigned int m_seed3;
117  };
119 }
Belle2::KoralW::m_seed1
unsigned int m_seed1
First seed for the random number generator.
Definition: KoralW.h:119
Belle2::KoralW::generateEvent
void generateEvent(MCParticleGraph &mcGraph, TVector3 vertex, TLorentzRotation boost)
Generates one single event.
Definition: KoralW.cc:109
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::KoralW::KoralW
KoralW()
Constructor.
Definition: KoralW.h:44
Belle2::KoralW::~KoralW
~KoralW()
Destructor.
Definition: KoralW.h:55
Belle2::KoralW::setCMSEnergy
void setCMSEnergy(double cmsEnergy)
Sets the CMS energy.
Definition: KoralW.h:60
Belle2::KoralW::m_cmsEnergy
double m_cmsEnergy
CMS Energy = 2*Ebeam [GeV].
Definition: KoralW.h:99
Belle2::KoralW::m_crossSectionError
double m_crossSectionError
The error on the cross section of the generated KoralW events.
Definition: KoralW.h:97
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KoralW::m_crossSection
double m_crossSection
The cross section of the generated KoralW events.
Definition: KoralW.h:95
Belle2::KoralW::getCrossSection
double getCrossSection()
Returns the total cross section of the generated process.
Definition: KoralW.h:85
Belle2::KoralW::m_seed2
unsigned int m_seed2
Second seed for the random number generator.
Definition: KoralW.h:121
Belle2::KoralW::m_seed3
unsigned int m_seed3
Third seed for the random number generator.
Definition: KoralW.h:123
Belle2::KoralW::m_numXPar
static constexpr int m_numXPar
Number of parameters for KoralW.
Definition: KoralW.h:115
Belle2::KoralW::getCrossSectionError
double getCrossSectionError()
Returns the error on the total cross section of the generated process.
Definition: KoralW.h:90
Belle2::KoralW::storeParticle
void storeParticle(MCParticleGraph &mcGraph, const float *mom, const float *vtx, int pdg, TVector3 vertex, TLorentzRotation boost, bool isVirtual=false, bool isInitial=false)
Store a single generated particle into the MonteCarlo graph.
Definition: KoralW.cc:136
Belle2::KoralW::term
void term()
Terminates the generator.
Definition: KoralW.cc:124
Belle2::KoralW::init
void init(const std::string &dataPath, const std::string &userDataFile)
Initializes the generator.
Definition: KoralW.cc:73
Belle2::KoralW::m_XPar
double m_XPar[m_numXPar]
Values of parameters for KoralW.
Definition: KoralW.h:117