Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtDecayMode Class Reference

#include <EvtDecayMode.hh>

List of all members.

Public Member Functions

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

Private Attributes

std::vector< std::string > _dau
std::string _mother


Constructor & Destructor Documentation

EvtDecayMode::EvtDecayMode const char *  decay  ) 
 

00061 {
00062   // Parse the decay string, it should be in a standard 
00063   // format, e.g. "B+ -> pi+ pi+ pi-" with all spaces
00064   
00065   string s(decay);
00066   size_t i,j;
00067 
00068   // mother
00069 
00070   i = s.find_first_not_of(" ");
00071   j = s.find_first_of(" ",i);
00072 
00073   if(i == string::npos) {
00074 
00075     report(INFO,"EvtGen") << "No non-space character found" << endl;
00076     assert(0);
00077   }
00078 
00079   if(j == string::npos) {
00080     
00081     report(INFO,"EvtGen") << "No space before -> found" << endl;
00082     assert(0);
00083   }
00084 
00085   _mother = string(s,i,j-i);
00086 
00087   i = s.find_first_not_of(" ",j);
00088   j = s.find_first_of("->",j);
00089   if(i != j) {
00090 
00091     report(INFO,"EvtGen") << "Multiple mothers?" << i << "," << j << endl;
00092     assert(0);
00093   }
00094   j += 2;
00095 
00096   while(1) {
00097 
00098     i = s.find_first_not_of(" ",j);
00099     j = s.find_first_of(" ",i);
00100 
00101     if(i == string::npos) break;
00102     if(j == string::npos) {
00103       _dau.push_back(string(s,i,s.size()-i+1));
00104       break;
00105     } else {
00106       _dau.push_back(string(s,i,j-i));
00107     }
00108   }
00109 }

EvtDecayMode::EvtDecayMode const EvtDecayMode other  ) 
 

00048   : _mother(other._mother)
00049 {
00050   unsigned i;
00051   for(i=0;i<other._dau.size();i++) {
00052     
00053     string s;
00054     s.append(other._dau[i]);
00055     _dau.push_back(s);
00056   }
00057 }

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

EvtDecayMode::~EvtDecayMode  ) 
 

00114 {}


Member Function Documentation

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

00177 {
00178   string s(q(i));
00179   s.append(":");
00180   s.append(q(j));
00181   return s.c_str();
00182 }

const char * EvtDecayMode::dau int  i  )  const
 

00130 {
00131   assert(0<=i && i< (int) _dau.size());
00132   return _dau[i].c_str();
00133 }

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

00155 {
00156   string s("m(");
00157   s.append(dau(first(i)));
00158   s.append(",");
00159   s.append(dau(second(i)));
00160   s.append(")");
00161   return s.c_str();
00162 }

const char * EvtDecayMode::mode  )  const
 

00136 {
00137   string ret = _mother + string(" -> ");
00138   int i;
00139   for(i=0;i<_dau.size()-1;i++) ret += string(_dau[i]) + string(" ");
00140   ret += _dau[_dau.size()-1];
00141   return ret.c_str();
00142 }

const char * EvtDecayMode::mother  )  const
 

00118 {
00119   return _mother.c_str();
00120 }

int EvtDecayMode::nD  )  const
 

00124 {
00125   return _dau.size();
00126 }

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

00146 {
00147   os << _mother.c_str() << " ->";
00148   unsigned i;
00149   for(i=0;i<_dau.size();i++) os << " " << _dau[i].c_str();
00150   return os;
00151 }

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

00166 {
00167   string s("q(");
00168   s.append(dau(first(i)));
00169   s.append(",");
00170   s.append(dau(second(i)));
00171   s.append(")");
00172   return s.c_str();
00173 }


Member Data Documentation

std::vector<std::string> EvtDecayMode::_dau [private]
 

std::string EvtDecayMode::_mother [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:04:58 2011 for BOSS6.5.5 by  doxygen 1.3.9.1