/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtDecayBase.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtGen/EvtDecayBase.hh
00012 //
00013 // Description:
00014 //
00015 // Modification history:
00016 //
00017 //    DJL/RYD     August 11, 1998         Module created
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   //These pure virtual methods has to be implemented
00037   //by any derived class
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   //These virtual methods can be implemented by the 
00045   //derived class to implement nontrivial functionality.
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   //Does not really belong here but I don't have a better place.
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   //Methods to set the maximum probability.
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   // lange - some models can take more daughters
00104   // than they really have to fool aliases (VSSBMIX for example)
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   //Should charge conservation be checked when model is 
00134   //created? 1=yes 0 no.
00135   int _chkCharge;
00136 
00137 
00138   //These are used for gathering statistics.
00139   double sum_prob;
00140   double max_prob;
00141 
00142 };
00143 
00144 #endif
00145 

Generated on Tue Nov 29 23:12:12 2016 for BOSS_7.0.2 by  doxygen 1.4.7