StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtDecayTable.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
10 //
11 // Module: EvtGen/EvtDecayTable.hh
12 //
13 // Description: Class to read in and handle the decays available
14 // to EvtGen for each particle, and the model to be
15 // used for each one.
16 //
17 // Modification history:
18 //
19 // DJL/RYD September 25, 1996 Module created
20 //
21 //------------------------------------------------------------------------
22 
23 #ifndef EVTDECAYTABLE_HH
24 #define EVTDECAYTABLE_HH
25 
26 #include "EvtGenBase/EvtDecayBase.hh"
27 #include "EvtGenBase/EvtParticleDecayList.hh"
28 #include <vector>
29 
30 class EvtId;
31 
33 
34 public:
35 
36  static EvtDecayTable* getInstance();
37 
38  int getNMode(int ipar);
39 
40  EvtDecayBase* getDecay(int ipar, int imode);
41 
42  void readDecayFile(const std::string dec_name, bool verbose=true);
43  void readXMLDecayFile(const std::string dec_name, bool verbose=true);
44 
45  bool stringToBoolean(std::string valStr);
46  void checkParticle(std::string particle);
47 
48  int findChannel(EvtId parent,std::string model,int ndaug,
49  EvtId *daugs,
50  int narg, std::string *args);
51 
52  int inChannelList(EvtId parent, int ndaug, EvtId *daugs);
53 
54  EvtDecayBase *getDecayFunc(EvtParticle *p);
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 
76  EvtDecayTable();
77  ~EvtDecayTable();
78 
79 private:
80 
81  std::vector<EvtParticleDecayList> _decaytable;
82 
83  EvtDecayTable(const EvtDecayTable&) {};
84  //EvtDecayTable& operator=(const EvtDecayTable&) {};
85 
86 };
87 
88 #endif
89 
90 
Definition: EvtId.hh:27