Belle II Software  release-05-01-25
EvtGenDatabasePDG.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/particledb/EvtGenParticlePDG.h>
14 #include <TDatabasePDG.h>
15 #include <iosfwd>
16 
17 namespace Belle2 {
23  class EvtGenDatabasePDG : public TDatabasePDG {
24  public:
26  static EvtGenDatabasePDG* Instance();
28  void ReadEvtGenTable(const char* filename = nullptr);
30  void WriteEvtGenTable(std::ostream& out);
32  void WriteEvtGenTable(const char* filename);
34  TParticlePDG* AddParticle(const char* name, const char* title, Double_t mass, Bool_t stable, Double_t width,
35  Double_t charge, const char* ParticleClass, Int_t PDGcode, Int_t Anti, Int_t TrackingCode) override
36  {
37  return AddParticle(name, title, mass, stable, width, charge, ParticleClass, PDGcode, Anti, TrackingCode, 0, 0, 0, 0);
38  }
40  EvtGenParticlePDG* AddParticle(const char* name, const char* title, Double_t mass, Bool_t stable, Double_t width,
41  Double_t charge, const char* ParticleClass, Int_t PDGcode, Int_t Anti, Int_t TrackingCode,
42  Double_t Lifetime, Double_t Spin, Double_t maxWidth, Int_t pythiaID);
43 
44  private:
46  EvtGenDatabasePDG() { }
48  EvtGenDatabasePDG(const EvtGenDatabasePDG&) = delete;
51 
53  };
55 } //Belle2 namespace
Belle2::EvtGenDatabasePDG::ReadEvtGenTable
void ReadEvtGenTable(const char *filename=nullptr)
Read EvtGen table.
Definition: EvtGenDatabasePDG.cc:90
Belle2::EvtGenDatabasePDG::operator=
EvtGenDatabasePDG & operator=(const EvtGenDatabasePDG &)=delete
singleton, make sure there's no assignment operator
Belle2::EvtGenDatabasePDG::ClassDefOverride
ClassDefOverride(EvtGenDatabasePDG, 1)
Replacement for TDatabasePDG that is filled from EvtGen's evt.pdl.
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EvtGenDatabasePDG::WriteEvtGenTable
void WriteEvtGenTable(std::ostream &out)
Write current database as EvtGen table to a stream.
Definition: EvtGenDatabasePDG.cc:183
Belle2::EvtGenDatabasePDG
Replacement for TDatabasePDG that is filled from EvtGen's evt.pdl.
Definition: EvtGenDatabasePDG.h:31
Belle2::EvtGenDatabasePDG::EvtGenDatabasePDG
EvtGenDatabasePDG()
singleton.
Definition: EvtGenDatabasePDG.h:54
Belle2::EvtGenDatabasePDG::AddParticle
TParticlePDG * AddParticle(const char *name, const char *title, Double_t mass, Bool_t stable, Double_t width, Double_t charge, const char *ParticleClass, Int_t PDGcode, Int_t Anti, Int_t TrackingCode) override
override old AddParticle
Definition: EvtGenDatabasePDG.h:42
Belle2::EvtGenDatabasePDG::Instance
static EvtGenDatabasePDG * Instance()
Instance method that loads the EvtGen table.
Definition: EvtGenDatabasePDG.cc:27