Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CompareMasses.C File Reference

Detailed Description

Macro to compare masses in ROOT data base to the values from pdg pdg.

The ROOT values are read in by TDatabasePDG from $ROOTSYS/etc/pdg_table.txt

W+ 24 pdg mass 8.039800E+01 pdg err 2.500000E-02 root Mass 8.037700E+01 >> deltaM 2.100372E-02 = 0.026%
tau- 15 pdg mass 1.776840E+00 pdg err 1.700000E-04 root Mass 1.776860E+00 >> deltaM 2.002716E-05 = 0.001%
u 2 pdg mass 2.400000E-03 pdg err 9.000000E-04 root Mass 2.160000E-03 >> deltaM 2.400002E-04 = 10.000%
d 1 pdg mass 4.800000E-03 pdg err 1.200000E-03 root Mass 4.670000E-03 >> deltaM 1.300001E-04 = 2.708%
s 3 pdg mass 1.040000E-01 pdg err 2.600000E-02 root Mass 9.340000E-02 >> deltaM 1.060000E-02 = 10.192%
b 5 pdg mass 4.680000E+00 pdg err 1.700000E-01 root Mass 4.180000E+00 >> deltaM 5.000000E-01 = 10.684%
t 6 pdg mass 1.712000E+02 pdg err 2.100000E+00 root Mass 1.725000E+02 >> deltaM 1.300003E+00 = 0.759%
eta 221 pdg mass 5.478530E-01 pdg err 2.400000E-05 root Mass 5.478620E-01 >> deltaM 9.000301E-06 = 0.002%
rho0 113 pdg mass 7.754900E-01 pdg err 3.400000E-04 root Mass 7.752600E-01 >> deltaM 2.300143E-04 = 0.030%
omega 223 pdg mass 7.826500E-01 pdg err 1.200000E-04 root Mass 7.826600E-01 >> deltaM 1.001358E-05 = 0.001%
eta' 331 pdg mass 9.576600E-01 pdg err 2.400000E-04 root Mass 9.577800E-01 >> deltaM 1.199841E-04 = 0.013%
h_1 10223 pdg mass 1.170000E+00 pdg err 2.000000E-02 root Mass 1.166000E+00 >> deltaM 3.999949E-03 = 0.342%
f_2 225 pdg mass 1.275100E+00 pdg err 1.200000E-03 root Mass 1.275400E+00 >> deltaM 3.000498E-04 = 0.024%
f_1 20223 pdg mass 1.281800E+00 pdg err 6.000000E-04 root Mass 1.281900E+00 >> deltaM 1.000166E-04 = 0.008%
a_20 115 pdg mass 1.318300E+00 pdg err 6.000000E-04 root Mass 1.318200E+00 >> deltaM 1.000166E-04 = 0.008%
f'_1 20333 pdg mass 1.426400E+00 pdg err 9.000000E-04 root Mass 1.426300E+00 >> deltaM 9.989738E-05 = 0.007%
a_00 10111 pdg mass 1.474000E+00 pdg err 1.900000E-02 root Mass 1.439000E+00 >> deltaM 3.499997E-02 = 2.374%
a_0+ 10211 pdg mass 1.474000E+00 pdg err 1.900000E-02 root Mass 9.835000E-01 >> deltaM 4.905000E-01 = 33.277%
f'_2 335 pdg mass 1.525000E+00 pdg err 5.000000E-03 root Mass 1.517400E+00 >> deltaM 7.599950E-03 = 0.498%
f'_0 10331 pdg mass 1.724000E+00 pdg err 7.000000E-03 root Mass 1.733000E+00 >> deltaM 9.000063E-03 = 0.522%
K*+ 323 pdg mass 8.916600E-01 pdg err 2.600000E-04 root Mass 8.916700E-01 >> deltaM 1.001358E-05 = 0.001%
K*0 313 pdg mass 8.960000E-01 pdg err 2.500000E-04 root Mass 8.955500E-01 >> deltaM 4.500151E-04 = 0.050%
K_10 10313 pdg mass 1.272000E+00 pdg err 7.000000E-03 root Mass 1.253000E+00 >> deltaM 1.899993E-02 = 1.494%
K*_00 10311 pdg mass 1.420000E+00 pdg err 5.000000E-02 root Mass 1.430000E+00 >> deltaM 9.999990E-03 = 0.704%
K*_2+ 325 pdg mass 1.425600E+00 pdg err 1.500000E-03 root Mass 1.427300E+00 >> deltaM 1.699924E-03 = 0.119%
D+ 411 pdg mass 1.869620E+00 pdg err 2.000000E-04 root Mass 1.869660E+00 >> deltaM 4.005432E-05 = 0.002%
D*0 423 pdg mass 2.006970E+00 pdg err 1.900000E-04 root Mass 2.006850E+00 >> deltaM 1.199245E-04 = 0.006%
D_10 10423 pdg mass 2.422300E+00 pdg err 1.300000E-03 root Mass 2.422100E+00 >> deltaM 2.000332E-04 = 0.008%
D_s+ 431 pdg mass 1.968490E+00 pdg err 3.400000E-04 root Mass 1.968350E+00 >> deltaM 1.399517E-04 = 0.007%
D*_s+ 433 pdg mass 2.112300E+00 pdg err 5.000000E-04 root Mass 2.112200E+00 >> deltaM 9.989738E-05 = 0.005%
D*_1s+ 20433 pdg mass 2.459600E+00 pdg err 6.000000E-04 root Mass 2.459500E+00 >> deltaM 9.989738E-05 = 0.004%
D_1s+ 10433 pdg mass 2.535300E+00 pdg err 6.000000E-04 root Mass 2.535110E+00 >> deltaM 1.900196E-04 = 0.007%
D*_2s+ 435 pdg mass 2.572600E+00 pdg err 9.000000E-04 root Mass 2.569100E+00 >> deltaM 3.499985E-03 = 0.136%
B+ 521 pdg mass 5.279150E+00 pdg err 3.100000E-04 root Mass 5.279340E+00 >> deltaM 1.897812E-04 = 0.004%
B0 511 pdg mass 5.279530E+00 pdg err 3.300000E-04 root Mass 5.279660E+00 >> deltaM 1.301765E-04 = 0.002%
B*0 513 pdg mass 5.325100E+00 pdg err 5.000000E-04 root Mass 5.324710E+00 >> deltaM 3.900528E-04 = 0.007%
B*_20 515 pdg mass 5.746900E+00 pdg err 2.900000E-03 root Mass 5.739500E+00 >> deltaM 7.400036E-03 = 0.129%
B*_2+ 525 pdg mass 5.746900E+00 pdg err 2.900000E-03 root Mass 5.737200E+00 >> deltaM 9.700298E-03 = 0.169%
B_s0 531 pdg mass 5.366300E+00 pdg err 6.000000E-04 root Mass 5.366920E+00 >> deltaM 6.198883E-04 = 0.012%
B*_s0 533 pdg mass 5.412800E+00 pdg err 1.300000E-03 root Mass 5.415400E+00 >> deltaM 2.600193E-03 = 0.048%
B*_2s0 535 pdg mass 5.839700E+00 pdg err 6.000000E-04 root Mass 5.839860E+00 >> deltaM 1.597404E-04 = 0.003%
B_c+ 541 pdg mass 6.276000E+00 pdg err 4.000000E-03 root Mass 6.274470E+00 >> deltaM 1.530170E-03 = 0.024%
eta_c 441 pdg mass 2.980300E+00 pdg err 1.200000E-03 root Mass 2.983900E+00 >> deltaM 3.600121E-03 = 0.121%
chi_0c 10441 pdg mass 3.414750E+00 pdg err 3.100000E-04 root Mass 3.414710E+00 >> deltaM 4.005432E-05 = 0.001%
h_1c 10443 pdg mass 3.525930E+00 pdg err 2.700000E-04 root Mass 3.525370E+00 >> deltaM 5.600452E-04 = 0.016%
Upsilon 553 pdg mass 9.460300E+00 pdg err 2.600000E-04 root Mass 9.460400E+00 >> deltaM 9.918213E-05 = 0.001%
Upsilon' 100553 pdg mass 1.002326E+01 pdg err 3.100000E-04 root Mass 1.002340E+01 >> deltaM 1.401901E-04 = 0.001%
Lambda(1520)0 3124 pdg mass 1.519500E+00 pdg err 1.000000E-03 root Mass 1.519000E+00 >> deltaM 4.999638E-04 = 0.033%
Sigma*+ 3224 pdg mass 1.382800E+00 pdg err 4.000000E-04 root Mass 1.382830E+00 >> deltaM 3.004074E-05 = 0.002%
Sigma_c++ 4222 pdg mass 2.454020E+00 pdg err 1.800000E-04 root Mass 2.453970E+00 >> deltaM 5.006790E-05 = 0.002%
Sigma_c+ 4212 pdg mass 2.452900E+00 pdg err 4.000000E-04 root Mass 2.452650E+00 >> deltaM 2.498627E-04 = 0.010%
Sigma*_c+ 4214 pdg mass 2.517500E+00 pdg err 2.300000E-03 root Mass 2.517400E+00 >> deltaM 9.989738E-05 = 0.004%
Sigma*_c0 4114 pdg mass 2.518000E+00 pdg err 5.000000E-04 root Mass 2.518480E+00 >> deltaM 4.801750E-04 = 0.019%
Xi_c+ 4232 pdg mass 2.467900E+00 pdg err 4.000000E-04 root Mass 2.467710E+00 >> deltaM 1.900196E-04 = 0.008%
Xi_c0 4132 pdg mass 2.471000E+00 pdg err 4.000000E-04 root Mass 2.470440E+00 >> deltaM 5.600452E-04 = 0.023%
Xi'_c+ 4322 pdg mass 2.575700E+00 pdg err 3.100000E-03 root Mass 2.578200E+00 >> deltaM 2.500057E-03 = 0.097%
Xi'_c0 4312 pdg mass 2.578000E+00 pdg err 2.900000E-03 root Mass 2.578700E+00 >> deltaM 6.999969E-04 = 0.027%
Xi*_c+ 4324 pdg mass 2.646600E+00 pdg err 1.400000E-03 root Mass 2.645100E+00 >> deltaM 1.499891E-03 = 0.057%
Xi*_c0 4314 pdg mass 2.646100E+00 pdg err 1.200000E-03 root Mass 2.646160E+00 >> deltaM 5.984306E-05 = 0.002%
Omega_c0 4332 pdg mass 2.697500E+00 pdg err 2.600000E-03 root Mass 2.695200E+00 >> deltaM 2.300024E-03 = 0.085%
Omega*_c0 4334 pdg mass 2.768300E+00 pdg err 3.000000E-03 root Mass 2.765900E+00 >> deltaM 2.400160E-03 = 0.087%
Lambda_b0 5122 pdg mass 5.620200E+00 pdg err 1.600000E-03 root Mass 5.619600E+00 >> deltaM 6.003380E-04 = 0.011%
Sigma_b+ 5222 pdg mass 5.807800E+00 pdg err 2.700000E-03 root Mass 5.810560E+00 >> deltaM 2.760410E-03 = 0.048%
Sigma_b- 5112 pdg mass 5.815200E+00 pdg err 2.000000E-03 root Mass 5.815640E+00 >> deltaM 4.401207E-04 = 0.008%
Sigma*_b+ 5224 pdg mass 5.829000E+00 pdg err 3.400000E-03 root Mass 5.830320E+00 >> deltaM 1.319885E-03 = 0.023%
Sigma*_b- 5114 pdg mass 5.836400E+00 pdg err 2.800000E-03 root Mass 5.834740E+00 >> deltaM 1.659870E-03 = 0.028%
Xi_b0 5232 pdg mass 5.792400E+00 pdg err 3.000000E-03 root Mass 5.791900E+00 >> deltaM 4.997253E-04 = 0.009%
Xi_b- 5132 pdg mass 5.792400E+00 pdg err 3.000000E-03 root Mass 5.797000E+00 >> deltaM 4.600048E-03 = 0.079%
#include "TDatabasePDG.h"
#include "TParticlePDG.h"
void CompareMasses()
{
TString massWidthFile = gSystem->UnixPathName(__FILE__);
massWidthFile.ReplaceAll("CompareMasses.C","mass_width_2008.mc.txt");
FILE* file = fopen(massWidthFile.Data(),"r");
if (!file){
Printf("Could not open PDG particle file %s", massWidthFile.Data());
return;
}
char c[200];
char cempty;
Int_t pdg[4];
Float_t mass, err1, err2, err;
Int_t ndiff = 0;
while (fgets(c, 200, file)) {
if (c[0] != '*' && c[0] !='W') {
//printf("%s",c);
sscanf(&c[1], "%8d", &pdg[0]);
// check emptiness
pdg[1] = 0;
for(int i = 0;i<8;i++){
sscanf(&c[9+i],"%c",&cempty);
if(cempty != ' ')sscanf(&c[9],"%8d",&pdg[1]);
}
pdg[2] = 0;
for(int i = 0;i<8;i++){
sscanf(&c[17+i],"%c",&cempty);
if(cempty != ' ')sscanf(&c[17],"%8d",&pdg[2]);
}
pdg[3] = 0;
for(int i = 0;i<8;i++){
sscanf(&c[25+i],"%c",&cempty);
if(cempty != ' ')sscanf(&c[25],"%8d",&pdg[3]);
}
sscanf(&c[35],"%14f",&mass);
sscanf(&c[50],"%8f",&err1);
sscanf(&c[50],"%8f",&err2);
err = TMath::Max((Double_t)err1,(Double_t)-1.*err2);
for(int ipdg = 0;ipdg < 4;ipdg++){
if(pdg[ipdg]==0)continue;
TParticlePDG *partRoot = TDatabasePDG::Instance()->GetParticle(pdg[ipdg]);
if(partRoot){
Float_t massRoot = partRoot->Mass();
Float_t deltaM = TMath::Abs(massRoot - mass);
// if(deltaM > err){
if (mass != 0.0 && deltaM/mass>1E-05){
ndiff++;
Printf("%10s %8d pdg mass %E pdg err %E root Mass %E >> deltaM %E = %3.3f%%",partRoot->GetName(),pdg[ipdg],mass,err,massRoot,deltaM,100.*deltaM/mass);
}
}
}
}
}// while
fclose(file);
if (ndiff == 0) Printf("Crongratulations !! All particles in ROOT and PDG have identical masses");
}
#define c(i)
Definition RSha256.hxx:101
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
double Double_t
Definition RtypesCore.h:59
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2503
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
static TDatabasePDG * Instance()
static function
TParticlePDG * GetParticle(Int_t pdgCode) const
Get a pointer to the particle object according to the MC code number.
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Description of the static properties of a particle.
Double_t Mass() const
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition TString.h:704
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition TSystem.cxx:1063
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:250
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:123
Author
Christian.Klein-Boesing

Definition in file CompareMasses.C.