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
EvtDecayTable.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 EVTDECAYTABLE_HH
22#define EVTDECAYTABLE_HH
23
26
27#include <vector>
28
29class EvtId;
30
31// Description: Class to read in and handle the decays available
32// to EvtGen for each particle, and the model to be
33// used for each one.
34
36 public:
37 static EvtDecayTable& getInstance();
38
39 int getNMode( int ipar ) const;
40
41 EvtDecayBase* getDecay( int ipar, int imode );
42
43 void readDecayFile( const std::string dec_name, bool verbose = true );
44 void readXMLDecayFile( const std::string dec_name, bool verbose = true );
45
46 bool stringToBoolean( std::string valStr ) const;
47 void checkParticle( std::string particle ) const;
48
49 int findChannel( EvtId parent, std::string model, int ndaug, EvtId* daugs,
50 int narg, std::string* args ) const;
51
52 int inChannelList( EvtId parent, int ndaug, EvtId* daugs ) const;
53
55
56 void printSummary() const;
57
58 void checkConj() const;
59
60 std::vector<EvtParticleDecayList> getDecayTable() const
61 {
62 return m_decaytable;
63 }
64
65 EvtDecayBase* findDecayModel( int aliasInt, int modeInt );
66 EvtDecayBase* findDecayModel( EvtId id, int modeInt );
67
68 bool hasPythia( int aliasInt ) const;
69 bool hasPythia( EvtId id ) const;
70
71 int getNModes( int aliasInt ) const;
72 int getNModes( EvtId id ) const;
73
74 std::vector<std::string> splitString( std::string& theString,
75 std::string& splitter ) const;
76
77 protected:
80
81 private:
82 std::vector<EvtParticleDecayList> m_decaytable;
83
85 //EvtDecayTable& operator=(const EvtDecayTable&) {};
86};
87
88#endif
void readXMLDecayFile(const std::string dec_name, bool verbose=true)
EvtDecayBase * getDecay(int ipar, int imode)
void printSummary() const
static EvtDecayTable & getInstance()
void checkConj() const
std::vector< EvtParticleDecayList > getDecayTable() const
EvtDecayBase * findDecayModel(int aliasInt, int modeInt)
bool stringToBoolean(std::string valStr) const
void readDecayFile(const std::string dec_name, bool verbose=true)
int findChannel(EvtId parent, std::string model, int ndaug, EvtId *daugs, int narg, std::string *args) const
bool hasPythia(int aliasInt) const
std::vector< std::string > splitString(std::string &theString, std::string &splitter) const
int getNModes(int aliasInt) const
void checkParticle(std::string particle) const
EvtDecayTable(const EvtDecayTable &)
int getNMode(int ipar) const
EvtDecayBase * getDecayFunc(EvtParticle *p)
int inChannelList(EvtId parent, int ndaug, EvtId *daugs) const
std::vector< EvtParticleDecayList > m_decaytable
Definition EvtId.hh:27