20   massWidthFile.
ReplaceAll(
"CompareMasses.C",
"mass_width_2008.mc.txt");
 
   22   FILE* 
file = fopen(massWidthFile.
Data(),
"r");
 
   25      Printf(
"Could not open PDG particle file %s", massWidthFile.
Data());
 
   35   while (fgets(
c, 200, 
file)) {
 
   36      if (
c[0] != 
'*' &&  
c[0] !=
'W') {
 
   38         sscanf(&
c[1], 
"%8d", &pdg[0]);
 
   42         for(
int i = 0;i<8;i++){
 
   43            sscanf(&
c[9+i],
"%c",&cempty);
 
   44            if(cempty != 
' ')sscanf(&
c[9],
"%8d",&pdg[1]);
 
   48         for(
int i = 0;i<8;i++){
 
   49            sscanf(&
c[17+i],
"%c",&cempty);
 
   50            if(cempty != 
' ')sscanf(&
c[17],
"%8d",&pdg[2]);
 
   54         for(
int i = 0;i<8;i++){
 
   55            sscanf(&
c[25+i],
"%c",&cempty);
 
   56            if(cempty != 
' ')sscanf(&
c[25],
"%8d",&pdg[3]);
 
   59         sscanf(&
c[35],
"%14f",&mass);
 
   60         sscanf(&
c[50],
"%8f",&err1);
 
   61         sscanf(&
c[50],
"%8f",&err2);
 
   63         for(
int ipdg = 0;ipdg  < 4;ipdg++){
 
   64            if(pdg[ipdg]==0)
continue;
 
   70               if (mass != 0.0 && deltaM/mass>1E-05){
 
   72                  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);
 
   79   if (ndiff == 0) 
Printf(
"Crongratulations !! All particles in ROOT and PDG have identical masses");
 
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
 
R__EXTERN TSystem * gSystem
 
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.
 
Description of the static properties of a particle.
 
const char * Data() const
 
TString & ReplaceAll(const TString &s1, const TString &s2)
 
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.