38 _rawbrfrsum=o._rawbrfrsum;
42 for(i=0;i<_nmode;i++){
57 std::vector<std::string> args;
59 for(j=0;j<tModel->
getNArg();j++){
82 for(i=0;i<_nmode;i++){
86 if (_decaylist!=0)
delete [] _decaylist;
92 for(i=0;i<_nmode;i++){
101 for(i=0;i<_nmode;i++){
102 delete _decaylist[i];
105 delete [] _decaylist;
137 report(
ERROR,
"EvtGen") <<
"Internal error!!!"<<endl;
143 for (j=0;j<1000;j++){
151 if ( breakL )
continue;
193 <<
" with mass:"<<p->
mass()
194 <<
" will throw event away! "<<endl;
210 report(
ERROR,
"EvtGen") <<
"Error _nmode not equal to zero!!!"<<endl;
212 delete [] _decaylist;
214 _decaylist=_decaylist_new;
221 if (nchannel>=_nmode) {
223 <<nchannel<<
" with only "<<_nmode
227 return *(_decaylist[nchannel]);
232 _rawbrfrsum=conjDecayList->_rawbrfrsum;
238 for(i=0;i<_nmode;i++){
240 _decaylist[i]->
chargeConj(conjDecayList->_decaylist[i]);
251 for(i=0;i<_nmode;i++){
252 newlist[i]=_decaylist[i];
264 for(i=0;i<_nmode;i++){
271 report(
ERROR,
"EvtGen") <<
"Two matching decays with same parent in decay table\n";
274 for (
int j=0; j<newDec->
getNDaug(); j++)
281 delete [] _decaylist;
294 if ( _rawbrfrsum< 0.000001 ) {
296 <<
"branching fraction sum greater than 0\n";
299 if (fabs(_rawbrfrsum-1.0)>0.0001) {
300 report(
INFO,
"EvtGen") <<
"Warning, sum of branching fractions for "
302 <<
" is "<<_rawbrfrsum<<endl;
303 report(
INFO,
"EvtGen") <<
"rescaled to one! "<<endl;
309 for(i=0;i<_nmode;i++){
310 double brfrsum=_decaylist[i]->
getBrfrSum()/_rawbrfrsum;
324 for(i=0;i<_nmode;i++){
331 report(
ERROR,
"EvtGen") <<
" Attempt to remove undefined mode for" << endl
334 for (
int j=0; j<decay->
getNDaug(); j++)
344 -_decaylist[match-1]->getBrfrSum());
347 double divisor = 1-match_bf;
348 if (divisor < 0.000001 && _nmode > 1) {
349 report(
ERROR,
"EvtGen") <<
"Removing requested mode leaves "
351 <<
" with zero sum branching fraction," << endl
352 <<
"but more than one decay mode remains. Aborting."
359 for(i=0;i<match;i++){
360 newlist[i]=_decaylist[i];
361 newlist[i]->
setBrfrSum(newlist[i]->getBrfrSum()/divisor);
363 for(i=match+1; i<_nmode; i++) {
364 newlist[i-1]=_decaylist[i];
365 newlist[i-1]->
setBrfrSum((newlist[i-1]->getBrfrSum()-match_bf)/divisor);
369 delete [] _decaylist;
376 delete [] _decaylist;
ostream & report(Severity severity, const char *facility)
virtual EvtDecayBase * clone()=0
virtual bool matchingDecay(const EvtDecayBase &other) const
std::string getModelName()
void saveDecayInfo(EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
double getBranchingFraction()
std::string getArgStr(int j)
static std::string name(EvtId i)
void removeMode(EvtDecayBase *decay)
EvtDecayBase * getDecayModel(EvtParticle *p)
void makeChargeConj(EvtParticleDecayList *conjDecayList)
void addMode(EvtDecayBase *decay, double brfr, double massmin)
EvtParticleDecay & getDecay(int nchannel)
void setDecayModel(EvtDecayBase *decay)
EvtDecayBase * getDecayModel()
void setMassMin(double massmin)
void chargeConj(EvtParticleDecay *decay)
void setBrfrSum(double brfrsum)
static void setRejectFlag()