Calculate 12C*->3-alpha decay & compare alpha KE with exact microcanonical distribution
Example of use of MicroStat::mdweight class, which can generate events according to the molecular dynamics ensemble i.e. fixed total energy and zero total momentum.
By default, 10**5 events are generated for the 3-alpha decay of a Carbon-12 nucleus with E*=50 MeV.
A histogram is filled with the kinetic energy distribution of one of the alpha particles, which is then fitted using the exact microcanonical probability distribution for a classical gas of 3 equal-mass particles.
To execute this function do
$ kaliveda
kaliveda[0] .L MicroStat_example.C+
#include "KVNucleus.h"
#include "KVNucleusEvent.h"
#include "mdweight.h"
double edist(
double*
x,
double* par)
{
double k = par[2] / (par[2] - 1.);
if (
E > 0 &&
E < par[1] / k) {
double w = par[0] *
pow(
E /
pow(par[1], 3), 0.5);
w *=
pow((1. - k *
E / par[1]), (3.*par[2] - 8.) / 2.);
}
return 0.;
}
void example(
double E0 = 50,
int nevents = 100000)
{
CN.SetExcitEnergy(E0);
Double_t etot = E0 + decay.GetChannelQValue();
if (etot <= 0) {
printf("Break-up channel is not allowed\n");
return;
}
TH1F*
h1 =
new TH1F(
"h1",
"Kinetic energy of alpha particle 3", 200, 0, etot * 2. / 3.);
while (nevents--) {
}
TF1* EDis =
new TF1(
"EDis", edist, 0., etot, 3);
}
R__EXTERN TStyle * gStyle
An event container for KVNucleus objects.
Description of properties and kinematics of atomic nuclei.
void GenerateEvent(KVEvent *partition, KVEvent *event)
Calculate molecular dynamics ensemble weights for events .
void resetGenerateEvent()
void initGenerateEvent(KVEvent *partition)
virtual void SetWeight(KVEvent *e, Double_t E)
virtual void SetNpx(Int_t npx=100)
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
virtual void FixParameter(Int_t ipar, Double_t value)
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual void Sumw2(Bool_t flag=kTRUE)
void Print(Option_t *option="") const override
void SetOptFit(Int_t fit=1)
RVec< PromoteTypes< T0, T1 > > pow(const RVec< T0 > &v, const T1 &y)