evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
29 class 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 );
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 );
47  void checkParticle( std::string particle );
48 
49  int findChannel( EvtId parent, std::string model, int ndaug, EvtId* daugs,
50  int narg, std::string* args );
51 
52  int inChannelList( EvtId parent, int ndaug, EvtId* daugs );
53 
55 
56  void printSummary();
57 
58  void checkConj();
59 
60  std::vector<EvtParticleDecayList> getDecayTable() { return _decaytable; };
61 
62  EvtDecayBase* findDecayModel( int aliasInt, int modeInt );
63  EvtDecayBase* findDecayModel( EvtId id, int modeInt );
64 
65  bool hasPythia( int aliasInt );
66  bool hasPythia( EvtId id );
67 
68  int getNModes( int aliasInt );
69  int getNModes( EvtId id );
70 
71  std::vector<std::string> splitString( std::string& theString,
72  std::string& splitter );
73 
74  protected:
75  EvtDecayTable();
77 
78  private:
79  std::vector<EvtParticleDecayList> _decaytable;
80 
82  //EvtDecayTable& operator=(const EvtDecayTable&) {};
83 };
84 
85 #endif
std::vector< std::string > splitString(std::string &theString, std::string &splitter)
int getNMode(int ipar)
static EvtDecayTable * getInstance()
EvtDecayTable(const EvtDecayTable &)
EvtDecayBase * getDecay(int ipar, int imode)
Definition: EvtId.hh:27
bool stringToBoolean(std::string valStr)
EvtDecayBase * getDecayFunc(EvtParticle *p)
int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
int getNModes(int aliasInt)
EvtDecayBase * findDecayModel(int aliasInt, int modeInt)
std::vector< EvtParticleDecayList > getDecayTable()
std::vector< EvtParticleDecayList > _decaytable
int findChannel(EvtId parent, std::string model, int ndaug, EvtId *daugs, int narg, std::string *args)
void readXMLDecayFile(const std::string dec_name, bool verbose=true)
void readDecayFile(const std::string dec_name, bool verbose=true)
void checkConj()
void checkParticle(std::string particle)
bool hasPythia(int aliasInt)