#include "hhypbljvpidlist.h"
#include "TMath.h"
#include "TFile.h"
ClassImp (HHypBljvPidList)
void HHypBljvPidList::fillPhysCnst (tPhysProp* Phys, FILE* otp)
{Int_t i;
Char_t sysPrtName[20];
Float_t m;
Bool_t endFlag;
endFlag = false;
i = 0;
while (!endFlag)
{i++;
m = HBPidPhysicsConstants::mass(i);
if (m >= 0)
{Phys->P[i].mass = m/1000.0;
Phys->P[i].charge = HBPidPhysicsConstants::charge (i);
Phys->P[i].leptonCharge = HBPidPhysicsConstants::leptonCharge(i);
Phys->P[i].baryonCharge = HBPidPhysicsConstants::baryonCharge(i);
Phys->P[i].strange = HBPidPhysicsConstants::strangeness (i);
sprintf (sysPrtName,"%s",HBPidPhysicsConstants::pid(i));
if (strcoll(sysPrtName,"anti_p" ) == 0) sprintf (Phys->P[i].name,"%s","~p" );
else if (strcoll(sysPrtName,"Lambda" ) == 0) sprintf (Phys->P[i].name,"%s","Lamb" );
else if (strcoll(sysPrtName,"Sigma+" ) == 0) sprintf (Phys->P[i].name,"%s","Sig+" );
else if (strcoll(sysPrtName,"Sigma0" ) == 0) sprintf (Phys->P[i].name,"%s","Sig0" );
else if (strcoll(sysPrtName,"Sigma-" ) == 0) sprintf (Phys->P[i].name,"%s","Sig-" );
else if (strcoll(sysPrtName,"Omega" ) == 0) sprintf (Phys->P[i].name,"%s","Omg-" );
else if (strcoll(sysPrtName,"anti_n" ) == 0) sprintf (Phys->P[i].name,"%s","~n" );
else if (strcoll(sysPrtName,"anti_Lambda") == 0) sprintf (Phys->P[i].name,"%s","~Lamb");
else if (strcoll(sysPrtName,"anti_Sigma-") == 0) sprintf (Phys->P[i].name,"%s","~Sig-");
else if (strcoll(sysPrtName,"anti_Sigma0") == 0) sprintf (Phys->P[i].name,"%s","~Sig0");
else if (strcoll(sysPrtName,"anti_Sigma+") == 0) sprintf (Phys->P[i].name,"%s","~Sig+");
else if (strcoll(sysPrtName,"anti_Xi0" ) == 0) sprintf (Phys->P[i].name,"%s","~Xi0" );
else if (strcoll(sysPrtName,"anti_Xi-" ) == 0) sprintf (Phys->P[i].name,"%s","~Xi-" );
else if (strcoll(sysPrtName,"anti_Omega-") == 0) sprintf (Phys->P[i].name,"%s","~Omg-");
else if (strcoll(sysPrtName,"dimuon" ) == 0) sprintf (Phys->P[i].name,"%s","dimu" );
else if (strcoll(sysPrtName,"dilepton" ) == 0) sprintf (Phys->P[i].name,"%s","dilep");
else sprintf (Phys->P[i].name,"%s",sysPrtName);
}
else {i--; endFlag = true;}
}
Phys->particles = i;
}
void HHypBljvPidList::getPrLvl (Int_t* prLvl, FILE* otp)
{Bool_t gotten;
Int_t t;
printf ("Enter print level:\n");
printf ("nulla %i (general report)\n",nulla);
printf ("minima %i (+ event loop)\n",minima);
printf ("media %i (+ particle combination loop)\n",media);
printf ("maxima %i (+ iteratio loop)\n",maxima);
printf ("paranoja %i (+ minimization step watch)\n",paranoja);
gotten = false;
while (!gotten)
{scanf ("%i",&t);
if ( (nulla <= t) && (t <= paranoja+1) ) gotten = true;
}
*prLvl = t;
printf ( "print level %i\n",*prLvl);
fprintf (otp,"print level %i\n",*prLvl);
}
void HHypBljvPidList::prntPhys (tPhysProp* Phys, FILE* otp)
{Int_t n,l,i;
fprintf (otp,"\nParticle property list\n");
fprintf (otp,"## name mass charge lepton baryon S\n");
for (n = 1; n < Phys->particles+1; n++)
{l = nameLength - strlen(Phys->P[n].name);
fprintf (otp,"%2i %s",n,Phys->P[n].name);
for (i = 0; i < l; i++) fprintf (otp," ");
fprintf (otp,"%9.6f %5i %5i %5i %5i\n",Phys->P[n].mass,Phys->P[n].charge,
Phys->P[n].leptonCharge,Phys->P[n].baryonCharge,Phys->P[n].strange);
}
fprintf (otp,"\n");
}
void HHypBljvPidList::typePhys (tPhysProp* Phys)
{Int_t n,l,i;
printf ("\n## name mass charge lepton baryon S\n");
for (n = 1; n < Phys->particles+1; n++)
{l = nameLength - strlen(Phys->P[n].name);
printf ("%2i %s",n,Phys->P[n].name);
for (i = 0; i < l; i++) printf (" ");
printf ("%9.6f %5i %5i %5i %5i\n",Phys->P[n].mass,Phys->P[n].charge,
Phys->P[n].leptonCharge,Phys->P[n].baryonCharge,Phys->P[n].strange);
}
printf ("\n");
}
Int_t HHypBljvPidList::nmToIndex (const Char_t* nomen, tPhysProp* Phys)
{Int_t i;
Bool_t found;
i = 0;
found = false;
while (!found && (i < Phys->particles) )
{i++;
if (strcoll(Phys->P[i].name,nomen) == 0) found = true;
}
if (found)
{
}
else
{i = 0;
printf ("nmToIndex: unexpected particle name '%s'\n",nomen);
}
return i;
}
HHypBljvPidList::HHypBljvPidList ()
{
}
HHypBljvPidList::~HHypBljvPidList ()
{
}
Bool_t HHypBljvPidList::init(void)
{
return kTRUE;
}
Last change: Sat May 22 12:57:41 2010
Last generated: 2010-05-22 12:57
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.