EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtPDL.hh
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
21#ifndef EVTPDL_HH
22#define EVTPDL_HH
23
24#include "EvtGenBase/EvtId.hh"
28
29#include <iosfwd>
30#include <limits>
31#include <map>
32#include <string>
33#include <vector>
34
35class EvtPDL final {
36 public:
37 static void read( const std::string& fname );
38 static void readPDT( std::istream& data );
39
40 static double getMeanMass( EvtId i );
41 static double getMass( EvtId i );
42 static double getRandMass( EvtId i, EvtId* parId, int nDaug, EvtId* dauId,
43 EvtId* othDaugId, double maxMass,
44 double* dauMasses );
45 static double getMassProb( EvtId i, double mass, double massPar, int nDaug,
46 double* massDau );
47
48 static double getMaxMass( EvtId i );
49 static double getMinMass( EvtId i );
50 //the number we got from PDT
51 static double getMaxRange( EvtId i );
52 static double getWidth( EvtId i );
53 static double getctau( EvtId i );
54 static int getStdHep( EvtId id );
55 static int getLundKC( EvtId id );
56
57 // Function to retrieve EvtId from PythiaID
58 static EvtId evtIdFromLundKC( int pythiaId );
59 static EvtId evtIdFromStdHep( int stdhep );
60 static EvtId chargeConj( EvtId id );
61 static int chg3( EvtId i );
63 static EvtId getId( const std::string& name );
64 static std::string name( EvtId i );
65 static void alias( EvtId num, const std::string& newname );
66 static void aliasChgConj( EvtId a, EvtId abar );
67 static size_t entries();
68 static EvtId getEntry( int i );
69 static void reSetMass( EvtId i, double mass );
70 static void reSetWidth( EvtId i, double width );
71 static void reSetMassMin( EvtId i, double mass );
72 static void reSetMassMax( EvtId i, double mass );
73 static void reSetBlatt( EvtId i, double blatt );
74 static void reSetBlattBirth( EvtId i, double blatt );
75 static void includeBirthFactor( EvtId i, bool yesno );
76 static void includeDecayFactor( EvtId i, bool yesno );
77 static void changeLS( EvtId i, std::string& newLS );
78 static void setPWForDecay( EvtId i, int spin, EvtId d1, EvtId d2 );
79 static void setPWForBirthL( EvtId i, int spin, EvtId par, EvtId othD );
80
81 private:
82 EvtPDL() = default;
83 EvtPDL( const EvtPDL& ) = delete;
84 EvtPDL( EvtPDL&& ) = delete;
85 EvtPDL& operator=( const EvtPDL& ) = delete;
86 EvtPDL& operator=( EvtPDL&& ) = delete;
87
88 static EvtPDL& getInstance();
89
90 void reset();
91
92 std::size_t m_firstAlias{ std::numeric_limits<std::size_t>::max() };
93
94 std::vector<EvtPartProp> m_partlist;
95
96 std::map<std::string, int> m_particleNameLookup;
97
98}; // EvtPDL.h
99
100#endif
Definition EvtId.hh:27
static double getWidth(EvtId i)
Definition EvtPDL.cpp:346
EvtPDL(const EvtPDL &)=delete
static void readPDT(std::istream &data)
Definition EvtPDL.cpp:59
static void reSetBlatt(EvtId i, double blatt)
Definition EvtPDL.cpp:411
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.cpp:371
static void includeDecayFactor(EvtId i, bool yesno)
Definition EvtPDL.cpp:426
static EvtId evtIdFromLundKC(int pythiaId)
Definition EvtPDL.cpp:294
static int getStdHep(EvtId id)
Definition EvtPDL.cpp:356
EvtPDL(EvtPDL &&)=delete
std::size_t m_firstAlias
Definition EvtPDL.hh:92
static void reSetMassMin(EvtId i, double mass)
Definition EvtPDL.cpp:401
static void setPWForBirthL(EvtId i, int spin, EvtId par, EvtId othD)
Definition EvtPDL.cpp:441
static EvtPDL & getInstance()
Definition EvtPDL.cpp:34
static void reSetBlattBirth(EvtId i, double blatt)
Definition EvtPDL.cpp:416
static double getMaxRange(EvtId i)
Definition EvtPDL.cpp:341
static int chg3(EvtId i)
Definition EvtPDL.cpp:366
static EvtId getEntry(int i)
Definition EvtPDL.cpp:386
void reset()
Definition EvtPDL.cpp:40
static double getMaxMass(EvtId i)
Definition EvtPDL.cpp:331
static double getMass(EvtId i)
Definition EvtPDL.cpp:311
static double getRandMass(EvtId i, EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
Definition EvtPDL.cpp:316
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cpp:241
static std::string name(EvtId i)
Definition EvtPDL.cpp:376
static void alias(EvtId num, const std::string &newname)
Definition EvtPDL.cpp:251
static size_t entries()
Definition EvtPDL.cpp:381
EvtPDL()=default
static double getMeanMass(EvtId i)
Definition EvtPDL.cpp:306
static void changeLS(EvtId i, std::string &newLS)
Definition EvtPDL.cpp:431
std::map< std::string, int > m_particleNameLookup
Definition EvtPDL.hh:96
EvtPDL & operator=(EvtPDL &&)=delete
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cpp:201
static double getMassProb(EvtId i, double mass, double massPar, int nDaug, double *massDau)
Definition EvtPDL.cpp:324
static double getctau(EvtId i)
Definition EvtPDL.cpp:351
static double getMinMass(EvtId i)
Definition EvtPDL.cpp:336
std::vector< EvtPartProp > m_partlist
Definition EvtPDL.hh:94
static int getLundKC(EvtId id)
Definition EvtPDL.cpp:361
static void setPWForDecay(EvtId i, int spin, EvtId d1, EvtId d2)
Definition EvtPDL.cpp:436
static void includeBirthFactor(EvtId i, bool yesno)
Definition EvtPDL.cpp:421
static void reSetWidth(EvtId i, double width)
Definition EvtPDL.cpp:396
static void aliasChgConj(EvtId a, EvtId abar)
Definition EvtPDL.cpp:185
static void read(const std::string &fname)
Definition EvtPDL.cpp:47
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
static void reSetMassMax(EvtId i, double mass)
Definition EvtPDL.cpp:406
static void reSetMass(EvtId i, double mass)
Definition EvtPDL.cpp:391
EvtPDL & operator=(const EvtPDL &)=delete