BOSS 8.0.0
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 55 of file EvtDecayMode.cc.

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

Referenced by EvtDecayMode().

◆ EvtDecayMode() [2/3]

EvtDecayMode::EvtDecayMode ( const EvtDecayMode & other)

Definition at line 44 of file EvtDecayMode.cc.

44 : _mother( other._mother ) {
45 unsigned i;
46 for ( i = 0; i < other._dau.size(); i++ )
47 {
48
49 string s;
50 s.append( other._dau[i] );
51 _dau.push_back( s );
52 }
53}
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 109 of file EvtDecayMode.cc.

109{}

Member Function Documentation

◆ dal()

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

Definition at line 153 of file EvtDecayMode.cc.

153 {
154 string s( q( i ) );
155 s.append( ":" );
156 s.append( q( j ) );
157 return s.c_str();
158}
****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 115 of file EvtDecayMode.cc.

115 {
116 assert( 0 <= i && i < (int)_dau.size() );
117 return _dau[i].c_str();
118}

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

◆ m()

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

Definition at line 135 of file EvtDecayMode.cc.

135 {
136 string s( "m(" );
137 s.append( dau( first( i ) ) );
138 s.append( "," );
139 s.append( dau( second( i ) ) );
140 s.append( ")" );
141 return s.c_str();
142}
const char * dau(int i) const
Index second(Pair i)
Index first(Pair i)

◆ mode()

const char * EvtDecayMode::mode ( ) const

Definition at line 120 of file EvtDecayMode.cc.

120 {
121 string ret = _mother + string( " -> " );
122 int i;
123 for ( i = 0; i < _dau.size() - 1; i++ ) ret += string( _dau[i] ) + string( " " );
124 ret += _dau[_dau.size() - 1];
125 return ret.c_str();
126}

Referenced by EvtMultiChannelParser::getDecayMode().

◆ mother()

const char * EvtDecayMode::mother ( ) const

Definition at line 111 of file EvtDecayMode.cc.

111{ return _mother.c_str(); }

Referenced by EvtDalitzPlot::EvtDalitzPlot(), and EvtDecayMode().

◆ nD()

int EvtDecayMode::nD ( ) const

Definition at line 113 of file EvtDecayMode.cc.

113{ return _dau.size(); }

◆ print()

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

Definition at line 128 of file EvtDecayMode.cc.

128 {
129 os << _mother.c_str() << " ->";
130 unsigned i;
131 for ( i = 0; i < _dau.size(); i++ ) os << " " << _dau[i].c_str();
132 return os;
133}
char * c_str(Index i)

Referenced by operator<<().

◆ q()

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

Definition at line 144 of file EvtDecayMode.cc.

144 {
145 string s( "q(" );
146 s.append( dau( first( i ) ) );
147 s.append( "," );
148 s.append( dau( second( i ) ) );
149 s.append( ")" );
150 return s.c_str();
151}

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