33 fCompNuc->SetExcitEnergy(0);
39 fFuncErel->SetNpx(5000);
52 if (fFunc)
delete fFunc;
63 ReadLevels(
Form(
"%s/%02d.dat", dir.
Data(), fCompNuc->GetZ()));
80 if (npars == 0)
break;
90 if (aa != fCompNuc->GetA() || zz != fCompNuc->GetZ())
continue;
118 AddResonance(ee, jpi.
Data(),
gamma.Data());
130 ll->
set(
ex, jpi, gam);
141 cout <<
" n." <<
" Jpi" <<
" E" <<
" T1/2" << endl;
143 for (
Int_t ii = (
int)fLevels.GetSize() - 1; ii >= 0; ii--) {
145 cout <<
Form(
"%3d", ii) <<
".";
149 cout <<
" " <<
Form(
"%5s", fCompNuc->GetSymbol()) << endl;
160 for (
Int_t ii = 0; ii < fLevels.GetSize(); ii++) {
175 if (unit.
EqualTo(
"EV")) gam *= 1
e-3;
176 else if (unit.
EqualTo(
"KEV")) gam *= 1;
177 else if (unit.
EqualTo(
"MEV")) gam *= 1e3;
178 else if (unit.
Contains(
"S")) gam *= 1
e-6;
194 if (jpi.
EqualTo(
"GE"))
return 0;
211 if (il > (
int)fLevels.GetSize())
return 0;
221 if (il > (
int)fLevels.GetSize())
return 0;
231 if (il > (
int)fLevels.GetSize())
return 0;
241 if (il > (
int)fLevels.GetSize())
return 0;
251 if (il > (
int)fLevels.GetSize())
return "";
260 if (il > (
int)fLevels.GetSize())
return 0;
280 if (jpi.
EqualTo(
"GE"))
return 0;
287 else if (jpi.
Contains(
"-")) pi = -1;
313 return func(xx - fQvalue * 1000,
tt);
327 double e1 = (m2 / (m1 + m2)) * erel;
328 double e2 = (m1 / (m1 + m2)) * erel;
364 GetParticlesFromErel(nuc1, nuc2, erel + qq, randAngle, vsrc);
373 if (!fLevels.GetSize()) cout <<
"KVLevelScheme::GetRandomParticles: please initialize the level scheme firts..." << endl;
374 fFunc->SetParameter(0,
T);
375 double excit = fFunc->GetRandom();
377 GetParticlesFromExci(n1, n2, excit, randAngle, vsrc);
402 for (
int ic = 0; ic < 20; ic++) cols[ic] = 0;
403 cols[0] = GetLevelEnergy(0);
405 for (
int ii = 0; ii < GetNLevels(); ii++) {
406 for (
int ic = 0; ic <
TMath::Max(ii, 20); ic++) {
407 if ((GetLevelEnergy(ii) - cols[ic] > dy)) {
408 cols[ic] = GetLevelEnergy(ii);
410 if (icol + 1 > ncol) ncol = icol + 1;
416 double max = GetLevelEnergy(GetNLevels() - 1);
418 hh =
new TH2F(
Form(
"dumhist%s", fCompNuc->GetSymbol()),
"", 1, 0, ncol * dx + 0.5 * dx, 1000, -200, max + 200);
424 cc =
new TCanvas(
Form(
"levels%s", fCompNuc->GetSymbol()),
Form(
"levels%s", fCompNuc->GetSymbol()), (ncol) * (dx) * 0.4 * 400, 800);
427 cc->SetTopMargin(0.02);
428 cc->SetBottomMargin(0.02);
429 cc->SetRightMargin(0.02);
430 cc->SetLeftMargin(0.02);
432 hh->GetXaxis()->SetAxisColor(0);
433 hh->GetYaxis()->SetAxisColor(0);
435 hh->GetXaxis()->SetLabelSize(0);
436 hh->GetYaxis()->SetNdivisions(0);
441 for (
int ic = 0; ic < 20; ic++) cols[ic] = 0;
442 cols[0] = GetLevelEnergy(0);
445 for (
int ii = 0; ii < GetNLevels(); ii++) {
446 for (
int ic = 0; ic <
TMath::Max(ii, 20); ic++) {
447 if ((GetLevelEnergy(ii) - cols[ic] > dy)) {
448 cols[ic] = GetLevelEnergy(ii);
454 TLine* ll =
new TLine(0.5 + dx * icol, GetLevelEnergy(ii), ddx + .5 + dx * icol, GetLevelEnergy(ii));
465 tex =
new TLatex(ddx + .6 + dx * icol, GetLevelEnergy(ii),
Form(
"%d",
TMath::Nint(GetLevelEnergy(ii))));
472 TLatex* tte =
new TLatex(0.5, 0.95,
Form(
"^{%d}%s", fCompNuc->GetA(), fCompNuc->GetSymbol(
"EL")));
479 hh->GetXaxis()->SetLimits(0, dx * (ncol + 0.5));
499 tte =
new TLatex(0.5 + (0.5 * ddx) + dx * (ncol - 1), qa * 1000 - 100, decay.
Data());
507 lq =
new TLine(0.5, qa * 1000, 0.5 + dx * (ncol - 1), qa * 1000);
513 lq =
new TLine(0.5 + dx * (ncol - 1), qa * 1000, 0.5 + ddx + dx * (ncol - 1), qa * 1000);
523 a.SetExcitEnergy(
ex / 1000.);
528 lq =
new TLine(0.5, qa * 1000, 0.5 + dx * (ncol - 1), qa * 1000);
534 lq =
new TLine(0.5 + dx * (ncol - 1), qa * 1000, 0.5 + ddx + dx * (ncol - 1), qa * 1000);
542 cc->SetWindowSize((ncol) * (dx) * 0.35 * 400, 800);
543 hh->GetXaxis()->SetLimits(0, dx * (ncol + 0.5));
552 if (!strcmp(outnuc,
"")) outnuc =
"1H";
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
Excited state of atomic nucleus.
void set(Double_t ee, Double_t ww, Double_t jj, Int_t pi)
Double_t eval(Double_t excit)
Handle reading text files.
TString GetReadPar(Int_t pos)
Bool_t OpenFileToRead(KVString filename)
void ReadLine(const Char_t *pattern)
Double_t GetDoubleReadPar(Int_t pos)
Int_t GetIntReadPar(Int_t pos)
Tool to simulate nucleus multi-particle decay.
Int_t GetLevelParity(int il)
double EvaluateErel(double *x, double *p)
void SetDrawStyle(double deMin=300., double fullWidth=1.3, double lineWidth=0.6, int textSize=22)
const char * GetEGammaStr(int il)
void DrawThreshold(const char *symb, Option_t *option="", double ex=0.)
double GetThreshold(const char *outnuc="")
static void GetParticlesFromExci(KVNucleus *n1, KVNucleus *n2, double erel, bool randAngle=0, TVector3 *vsrc=0)
virtual ~KVLevelScheme()
Destructor.
static void GetParticlesFromErel(KVNucleus *n1, KVNucleus *n2, double erel, bool randAngle=0, TVector3 *vsrc=0)
Double_t GetLevelEnergy(int il)
Int_t GetLevelSpin(int il)
void SetDecayProduct(KVNucleus *nuc, double excit_energy=0)
void Draw(Option_t *option="")
void ReadLevels(const char *file)
double getWidth(double gam, TString unit)
double Evaluate(double *x, double *p)
const char * GetJPiStr(int il)
void AddResonance(Double_t ex, const char *jpi, const char *gam)
void GetRandomParticles(KVNucleus *n1, KVNucleus *n2, double T, bool randAngle=0, TVector3 *vsrc=0)
double func(double xx, double tt)
Double_t GetLevelWidth(int il)
Description of properties and kinematics of atomic nuclei.
const Char_t * GetSymbol(Option_t *opt="") const
void SetExcitEnergy(Double_t e)
Double_t GetExcitEnergy() const
Int_t GetZ() const
Return the number of proton / atomic number.
void SetTheta(Double_t theta)
void SetVelocity(const TVector3 &)
Set velocity of particle (in cm/ns units)
void SetKE(Double_t ecin)
void SetFrame(const Char_t *frame, const KVFrameTransform &)
KVParticle const * GetFrame(const Char_t *frame, Bool_t warn_and_return_null_if_unknown=kTRUE) const
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void RemoveAllExtraWhiteSpace()
virtual void SetTextAlign(Short_t align=11)
virtual void SetTextFont(Font_t tfont=62)
virtual void SetTextSize(Float_t tsize=1)
virtual void Draw(Option_t *option="")
TRotation & SetXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Bool_t EqualTo(const char *cs, ECaseCompare cmp=kExact) const
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void SetOptStat(Int_t stat=1)
virtual void SetNDC(Bool_t isNDC=kTRUE)
const long double cc
volumes
Double_t Max(Double_t a, Double_t b)