BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDecayMode Class Reference

#include <EvtDecayMode.hh>

Public Member Functions

 EvtDecayMode (const char *decay)
 
 EvtDecayMode (const EvtDecayMode &other)
 
 EvtDecayMode (std::string mother, std::vector< std::string > dau)
 
 ~EvtDecayMode ()
 
const char * mother () const
 
int nD () const
 
const char * dau (int i) const
 
std::ostream & print (std::ostream &) const
 
const char * m (EvtCyclic3::Pair i) const
 
const char * q (EvtCyclic3::Pair i) const
 
const char * dal (EvtCyclic3::Pair i, EvtCyclic3::Pair j) const
 
const char * mode () const
 

Detailed Description

Definition at line 26 of file EvtDecayMode.hh.

Constructor & Destructor Documentation

◆ EvtDecayMode() [1/3]

EvtDecayMode::EvtDecayMode ( const char * decay)

Definition at line 60 of file EvtDecayMode.cc.

61{
62 // Parse the decay string, it should be in a standard
63 // format, e.g. "B+ -> pi+ pi+ pi-" with all spaces
64
65 string s(decay);
66 size_t i,j;
67
68 // mother
69
70 i = s.find_first_not_of(" ");
71 j = s.find_first_of(" ",i);
72
73 if(i == string::npos) {
74
75 report(INFO,"EvtGen") << "No non-space character found" << endl;
76 assert(0);
77 }
78
79 if(j == string::npos) {
80
81 report(INFO,"EvtGen") << "No space before -> found" << endl;
82 assert(0);
83 }
84
85 _mother = string(s,i,j-i);
86
87 i = s.find_first_not_of(" ",j);
88 j = s.find_first_of("->",j);
89 if(i != j) {
90
91 report(INFO,"EvtGen") << "Multiple mothers?" << i << "," << j << endl;
92 assert(0);
93 }
94 j += 2;
95
96 while(1) {
97
98 i = s.find_first_not_of(" ",j);
99 j = s.find_first_of(" ",i);
100
101 if(i == string::npos) break;
102 if(j == string::npos) {
103 _dau.push_back(string(s,i,s.size()-i+1));
104 break;
105 } else {
106 _dau.push_back(string(s,i,j-i));
107 }
108 }
109}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ INFO
Definition EvtReport.hh:52
XmlRpcServer s

◆ EvtDecayMode() [2/3]

EvtDecayMode::EvtDecayMode ( const EvtDecayMode & other)

Definition at line 47 of file EvtDecayMode.cc.

48 : _mother(other._mother)
49{
50 unsigned i;
51 for(i=0;i<other._dau.size();i++) {
52
53 string s;
54 s.append(other._dau[i]);
55 _dau.push_back(s);
56 }
57}
Index other(Index i, Index j)

◆ EvtDecayMode() [3/3]

EvtDecayMode::EvtDecayMode ( std::string mother,
std::vector< std::string > dau )

◆ ~EvtDecayMode()

EvtDecayMode::~EvtDecayMode ( )

Definition at line 113 of file EvtDecayMode.cc.

114{}

Member Function Documentation

◆ dal()

const char * EvtDecayMode::dal ( EvtCyclic3::Pair i,
EvtCyclic3::Pair j ) const

Definition at line 176 of file EvtDecayMode.cc.

177{
178 string s(q(i));
179 s.append(":");
180 s.append(q(j));
181 return s.c_str();
182}
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33

◆ dau()

const char * EvtDecayMode::dau ( int i) const

Definition at line 129 of file EvtDecayMode.cc.

130{
131 assert(0<=i && i< (int) _dau.size());
132 return _dau[i].c_str();
133}

Referenced by EvtDalitzPlot::EvtDalitzPlot(), m(), and q().

◆ m()

const char * EvtDecayMode::m ( EvtCyclic3::Pair i) const

Definition at line 154 of file EvtDecayMode.cc.

155{
156 string s("m(");
157 s.append(dau(first(i)));
158 s.append(",");
159 s.append(dau(second(i)));
160 s.append(")");
161 return s.c_str();
162}
const char * dau(int i) const
Index second(Pair i)
Index first(Pair i)

◆ mode()

const char * EvtDecayMode::mode ( ) const

Definition at line 135 of file EvtDecayMode.cc.

136{
137 string ret = _mother + string(" -> ");
138 int i;
139 for(i=0;i<_dau.size()-1;i++) ret += string(_dau[i]) + string(" ");
140 ret += _dau[_dau.size()-1];
141 return ret.c_str();
142}

Referenced by EvtMultiChannelParser::getDecayMode().

◆ mother()

const char * EvtDecayMode::mother ( ) const

Definition at line 117 of file EvtDecayMode.cc.

118{
119 return _mother.c_str();
120}

Referenced by EvtDalitzPlot::EvtDalitzPlot().

◆ nD()

int EvtDecayMode::nD ( ) const

Definition at line 123 of file EvtDecayMode.cc.

124{
125 return _dau.size();
126}

◆ print()

ostream & EvtDecayMode::print ( std::ostream & ) const

Definition at line 145 of file EvtDecayMode.cc.

146{
147 os << _mother.c_str() << " ->";
148 unsigned i;
149 for(i=0;i<_dau.size();i++) os << " " << _dau[i].c_str();
150 return os;
151}
char * c_str(Index i)

Referenced by operator<<().

◆ q()

const char * EvtDecayMode::q ( EvtCyclic3::Pair i) const

Definition at line 165 of file EvtDecayMode.cc.

166{
167 string s("q(");
168 s.append(dau(first(i)));
169 s.append(",");
170 s.append(dau(second(i)));
171 s.append(")");
172 return s.c_str();
173}

The documentation for this class was generated from the following files: