Belle II Software  release-05-01-25
EvtGenParticlePDG.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 <TParticlePDG.h>
14 
15 namespace Belle2 {
24  class EvtGenParticlePDG : public TParticlePDG {
25  public:
27  EvtGenParticlePDG(const char* name, const char* title, Double_t mass, Bool_t stable, Double_t width,
28  Double_t charge, const char* ParticleClass, Int_t PDGcode, Int_t Anti, Int_t TrackingCode,
29  Double_t Lifetime, Double_t Spin, Double_t maxWidth, int pythiaID):
30  TParticlePDG(name, title, mass, stable, width, charge, ParticleClass, PDGcode, Anti, TrackingCode),
31  m_maxWidth(maxWidth), m_pythiaID(pythiaID)
32  {
33  // override members in base class
34  fLifetime = Lifetime;
35  fSpin = Spin;
36  }
38  Double_t MaxWidth() const { return m_maxWidth; }
40  Int_t PythiaID() const { return m_pythiaID; }
42  std::string __repr__() const;
43  protected:
45  Double_t m_maxWidth{0};
47  Int_t m_pythiaID{0};
50  };
51 
53 } //Belle2 namespace
Belle2::EvtPDLUtil::charge
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:46
Belle2::EvtGenParticlePDG::PythiaID
Int_t PythiaID() const
Return pythia id of this particle.
Definition: EvtGenParticlePDG.h:48
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EvtGenParticlePDG::ClassDef
ClassDef(EvtGenParticlePDG, 1)
ROOT Dictionary.
Belle2::EvtGenParticlePDG::m_maxWidth
Double_t m_maxWidth
max width of the particle (max_Dm in evt.pdl)
Definition: EvtGenParticlePDG.h:53
Belle2::EvtGenParticlePDG::__repr__
std::string __repr__() const
Return a string repesentation of this particle to be used when printing the particle in python.
Definition: EvtGenParticlePDG.cc:28
Belle2::EvtGenParticlePDG::MaxWidth
Double_t MaxWidth() const
Return max width (max_Dm in evt.pdl)
Definition: EvtGenParticlePDG.h:46
Belle2::EvtGenParticlePDG::EvtGenParticlePDG
EvtGenParticlePDG(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, Double_t Lifetime, Double_t Spin, Double_t maxWidth, int pythiaID)
Construct with all values.
Definition: EvtGenParticlePDG.h:35
Belle2::EvtGenParticlePDG::m_pythiaID
Int_t m_pythiaID
pythia id of the particle
Definition: EvtGenParticlePDG.h:55