00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef EVTDECAYBASE_HH
00022 #define EVTDECAYBASE_HH
00023
00024 #include "EvtGenBase/EvtPatches.hh"
00025 #include "EvtGenBase/EvtId.hh"
00026 #include <string>
00027 #include "EvtGenBase/EvtSpinType.hh"
00028 #include <stdlib.h>
00029 #include <vector>
00030 class EvtParticle;
00031 class EvtSpinType;
00032
00033 class EvtDecayBase{
00034 public:
00035
00036
00037
00038 virtual void getName(std::string& name)=0;
00039 virtual void decay(EvtParticle *p)=0;
00040 virtual void makeDecay(EvtParticle *p)=0;
00041 virtual EvtDecayBase* clone()=0;
00042
00043
00044
00045
00046 virtual void init();
00047 virtual void initProbMax();
00048 virtual std::string commandName();
00049 virtual void command(std::string cmd);
00050
00051
00052 double getProbMax( double prob );
00053 double resetProbMax( double prob );
00054
00055 EvtDecayBase();
00056 virtual ~EvtDecayBase();
00057
00058 virtual bool matchingDecay(const EvtDecayBase &other) const;
00059
00060 EvtId getParentId() {return _parent;}
00061 double getBranchingFraction() {return _brfr;}
00062 void disableCheckQ() {_chkCharge=0;};
00063 void checkQ();
00064 int getNDaug() {return _ndaug;}
00065 EvtId* getDaugs() {return _daug;}
00066 EvtId getDaug(int i) {return _daug[i];}
00067 int getNArg() {return _narg;}
00068 int getPHOTOS() {return _photos;}
00069 void setPHOTOS() {_photos=1;}
00070 void setVerbose() {_verbose=1;}
00071 void setSummary() {_summary=1;}
00072 double* getArgs();
00073 std::string* getArgsStr() {return _args;}
00074 double getArg(int j);
00075 std::string getArgStr(int j) {return _args[j];}
00076 std::string getModelName() {return _modelname; }
00077 int getDSum() {return _dsum; }
00078 int summary() {return _summary; }
00079 int verbose() {return _verbose; }
00080
00081 void saveDecayInfo(EvtId ipar, int ndaug,EvtId *daug,
00082 int narg, std::vector<std::string>& args,
00083 std::string name, double brfr);
00084 void printSummary();
00085
00086
00087
00088 static void findMasses(EvtParticle *p, int ndaugs,
00089 EvtId daugs[10], double masses[10]);
00090 static void findMass(EvtParticle *p);
00091 static double findMaxMass(EvtParticle *p);
00092
00093
00094 void setProbMax(double prbmx);
00095 void noProbMax();
00096
00097 void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1);
00098 void checkNDaug(int d1, int d2=-1);
00099
00100 void checkSpinParent(EvtSpinType::spintype sp);
00101 void checkSpinDaughter(int d1, EvtSpinType::spintype sp);
00102
00103
00104
00105 virtual int nRealDaughters() { return _ndaug;}
00106
00107 protected:
00108
00109 bool _daugsDecayedByParentModel;
00110 bool daugsDecayedByParentModel() {return _daugsDecayedByParentModel;}
00111
00112 private:
00113
00114
00115 int _photos;
00116 int _ndaug;
00117 EvtId _parent;
00118 int _narg;
00119 EvtId *_daug;
00120 double *_argsD;
00121 std::string *_args;
00122 std::string _modelname;
00123 double _brfr;
00124 int _dsum;
00125 int _summary;
00126 int _verbose;
00127
00128
00129 int defaultprobmax;
00130 double probmax;
00131 int ntimes_prob;
00132
00133
00134
00135 int _chkCharge;
00136
00137
00138
00139 double sum_prob;
00140 double max_prob;
00141
00142 };
00143
00144 #endif
00145