128 if ( v[0] == std::string(
"MAXPDF" ) ) {
129 m_pdfMax = strtod( v[1].c_str(), tc );
131 printf(
"Bad pdfMax=%f\n",
m_pdfMax );
134 }
else if ( v[0] == std::string(
"SCANPDF" ) ) {
135 m_nScan = atoi( v[1].c_str() );
137 printf(
"Error parsing decay file\n" );
143 bool conjugate =
false;
147 while ( i < v.size() ) {
148 [[maybe_unused]]
size_t i0 = i;
151 if ( v[i] == std::string(
"CONJUGATE" ) ) {
152 assert( conjugate ==
false );
155 m_dm = strtod( v[i++].c_str(), tc );
162 std::vector<std::string> params;
166 if ( !conjugate && v[i] == std::string(
"AMPLITUDE" ) ) {
168 params.push_back( v[i] );
169 m_amp.push_back( params );
175 }
else if ( conjugate && v[i] == std::string(
"AMPLITUDE" ) ) {
177 params.push_back( v[i] );
184 printf(
"Expect keyword, found parameter %s\n", v[i].c_str() );
191 printf(
"PARSING SUCCESSFUL\n" );
192 printf(
"%d amplitude terms\n", (
int)
m_amp.size() );
193 printf(
"%d conj amplitude terms\n", (
int)
m_ampConj.size() );
197 const std::vector<std::string>& v,
203 std::string coefString = v[i++];
204 assert( coefString == std::string(
"COEFFICIENT" ) );
206 if ( v[i] == std::string(
"POLAR_DEG" ) ) {
207 double mag = strtod( v[i + 1].c_str(), tc );
208 double phaseRad = strtod( v[i + 2].c_str(), tc ) *
EvtConst::pi / 180.0;
210 c =
EvtComplex( mag * cos( phaseRad ), mag * sin( phaseRad ) );
212 }
else if ( v[i] == std::string(
"POLAR_RAD" ) ) {
213 double mag = strtod( v[i + 1].c_str(), tc );
214 double phaseRad = strtod( v[i + 2].c_str(), tc );
216 c =
EvtComplex( mag * cos( phaseRad ), mag * sin( phaseRad ) );
218 }
else if ( v[i] == std::string(
"CARTESIAN" ) ) {
219 double re = strtod( v[i + 1].c_str(), tc );
220 double im = strtod( v[i + 2].c_str(), tc );
225 printf(
"Invalid format %s for complex coefficient\n", v[i].c_str() );