BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtParticleDecay.cc
Go to the documentation of this file.
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: EvtDecayParm.cc
12//
13// Description: Store decay parameters for one decay.
14//
15// Modification history:
16//
17// RYD April 5, 1997 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtParticleDecay.hh"
22#include "EvtId.hh"
23#include "EvtPDL.hh"
24#include "EvtParticle.hh"
25#include "EvtPatches.hh"
26#include "EvtRandom.hh"
27#include "EvtReport.hh"
28#include <ctype.h>
29#include <fstream>
30#include <iostream>
31#include <stdlib.h>
32#include <string>
33#include <vector>
34using std::fstream;
36
37 if ( _decay != 0 ) _decay->printSummary();
38}
39
41
42 _brfrsum = decay->_brfrsum;
43 _massmin = decay->_massmin;
44
45 _decay = decay->_decay->clone();
46
47 int ndaug = decay->_decay->getNDaug();
48 int narg = decay->_decay->getNArg();
49 double brfr = decay->_decay->getBranchingFraction();
50 std::string name;
51 decay->_decay->getName( name );
52 EvtId ipar = EvtPDL::chargeConj( decay->_decay->getParentId() );
53 int i;
54 EvtId* daug = new EvtId[ndaug];
55 for ( i = 0; i < ndaug; i++ )
56 { daug[i] = EvtPDL::chargeConj( decay->_decay->getDaug( i ) ); }
57 // Had to add 1 to make sure the vector is not empty!
58 std::vector<std::string> args;
59 for ( i = 0; i < narg; i++ ) { args.push_back( decay->_decay->getArgStr( i ) ); }
60
61 _decay->saveDecayInfo( ipar, ndaug, daug, narg, args, name, brfr );
62
63 if ( decay->_decay->getPHOTOS() ) _decay->setPHOTOS();
64
65 delete[] daug;
66}
virtual EvtDecayBase * clone()=0
virtual void getName(std::string &name)=0
EvtId getParentId()
double getBranchingFraction()
EvtId getDaug(int i)
std::string getArgStr(int j)
Definition EvtId.hh:27
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:193
void chargeConj(EvtParticleDecay *decay)