17 const char*
ParticleProperties::pionString =
"1.3957018E+02 ,3.5E-04,3.5E-04,2.5284E-14 ,5.0E-18,5.0E-18,1 ,-,0 ,-, ,B, 211, +, ,R,pi ,uD ";
23 out <<
"Mass " << mass() <<
" +" << mErrPlus() <<
" -" << mErrMinus()
24 <<
"\nWidth " << width() <<
" +" << wErrPlus() <<
" -" << wErrMinus()
25 <<
"\n I=" << I() <<
", G=" << G()
26 <<
"\n J=" << J() <<
", C=" << C() <<
", P=" << P()
27 <<
"\n Q = " << charge()
28 <<
"\n pdg_id " << pdg_id()
29 <<
"\n name " << name()
30 <<
"\n quark content: " << quarks()
32 <<
"\n is its own antiparticle? " << (isItsOwnAnti() ?
"yes" :
"no")
33 <<
"\n lifetime " << lifetime_in_ps() <<
" ps" 34 <<
"\n radius " << radius()*
GeV <<
" /GeV" 52 if(pdg_string.empty())
return;
53 if(pdg_string[0] ==
'*')
return;
55 replace(pdg_string.begin(), pdg_string.end(),
'\n',
',');
56 remove(pdg_string.begin(), pdg_string.end(),
' ');
58 static const unsigned int nFields=18;
59 std::string
s[nFields];
60 unsigned int first= 0;
61 unsigned int counter=0;
62 unsigned int charCounter=0;
63 while(counter < nFields){
64 if(pdg_string[charCounter] ==
','){
65 int n=charCounter-first;
68 std::string tempString =
" ";
69 if(n >= 1) tempString = pdg_string.substr(first, n);
71 cout <<
" tempString for charCounter = " << charCounter
72 <<
", and counter = " << counter
73 <<
" is: " << tempString << endl;
75 if(tempString.empty()){
78 s[counter] = tempString;
82 first = charCounter+1;
84 if(charCounter < pdg_string.size()-1) charCounter++;
86 if(counter != nFields)
return;
89 cout <<
"the strings : ";
90 for(
unsigned int i=0; i<nFields; i++) cout <<
s[i] <<
"\n";
94 _mass = atof(
s[0].c_str());
102 char Gchar =
s[7][0];
104 char Pchar =
s[9][0];
105 char Cchar =
s[10][0];
121 if(Cchar ==
'+')
_Cqm= 1;
122 if(Cchar ==
'-')
_Cqm= -1;
123 if(Cchar ==
' ')
_Cqm= 0;
124 if(Cchar ==
'0')
_Cqm= 0;
134 cout <<
"ParticleProperties constructor: " 135 <<
"This is how I parsed the string: ";
153 string parName = pdg_id_string +
"_Radius_invGeV";
157 , NamedParameterBase::QUIET
159 if(specificR > -9998){
165 , NamedParameterBase::QUIET);
166 if(genericR > -9998){
203 unsigned int pos =
_quarks.find(
"SqrT");
205 _quarks.replace(pos, 4,
"sqrt");
237 std::string fullName =
_name;
244 if(
width()<0)
return -9999.0;
245 if(
width() == 0)
return 9.9999e109;
275 if(
J()==
"0" &&
P() == -1)
return "P";
276 else if(
J()==
"1" &&
P() == -1)
return "V";
277 else if(
J()==
"0" &&
P() == 1)
return "S";
278 else if(
J()==
"1" &&
P() == 1)
return "A";
279 else if(
J()==
"2" &&
P() == 1)
return "T";
280 else if(
J()==
"2" &&
P() == -1)
return "PT";
285 return ( 9981 == abs(
pdg_id())
297 || 999981 == abs(
pdg_id())
298 || 999991 == abs(
pdg_id())
299 || 999983 == abs(
pdg_id())
300 || 999993 == abs(
pdg_id())
301 || 999985 == abs(
pdg_id())
302 || 999975 == abs(
pdg_id())
double lifetime_in_ps() const
MultiQuarkContent _netQuarkContent
static const char * pionString
bool initFromString(const std::string &str)
std::ostream & operator<<(std::ostream &out, const ParticleProperties &pp)
static const double picosecond
static double _defaultCharmRadius
static const double hbar_Planck
bool hasDistinctAnti() const
void print(std::ostream &out=std::cout) const
ParticleProperties(std::string pdg_string="")
void setMass(double m) const
double lifetime_in_ns() const
MultiQuarkContent netQuarkContent(const DecayTree &dt_in)
static const double c_light
bool isNonResonant() const
double ctau_in_microns() const
std::string anythingToString(const T &anything)
ParticleProperties anti() const
static const double micrometer
std::string ScalarVectorPseudoAxialVectorTensor() const
static double _defaultRadius