8#include "KVNucleusEvent.h"
27 SetConditions(0, 0, 0);
31 RedefineTRandom(
"TRandom3");
33 BreakUpMethod =
"BreakUsingChain";
34 SetBreakUpMethod(BreakUpMethod);
37 lhisto->SetOwner(
kTRUE);
39 hzz =
new TH1F(
"KVBreakUp_hzz",
"distri z", 200, -0.5, 199.5);
44 lobjects->SetOwner(
kTRUE);
49 tstart = tstop = tellapsed = 0;
92 if ((
c1 = (
TCanvas*)
gROOT->GetListOfCanvases()->FindObject(
"BreakUp_Control")))
delete c1;
126 hzt =
new TH1F(
"KVBreakUp_hzt",
"h ztotal", 200, -0.5, 199.5);
128 hmt =
new TH1F(
"KVBreakUp_hmt",
"h mtotal", 200, -0.5, 199.5);
159 Error(
"SetMtot",
"%d -> La multiplicite max (%d) est depassee", mt,
size_max);
249 if (bup_method ==
"") {
250 Info(
"DefineBreakUpMethod",
"Available methods are");
251 cout <<
"BreakUsingChain" << endl;
252 cout <<
"BreakUsingPile" << endl;
253 cout <<
"BreakUsingIndividual" << endl;
254 cout <<
"BreakUsingLine" << endl;
255 cout <<
"Make your choice" << endl;
350 if (
bound[bb] == 1) {
360 Int_t mtot_corr = val.size();
365 for (
Int_t ii = 1; ii < mtot_corr; ii += 1) {
366 taille = val[ii] - val[ii - 1];
372 taille = Ztotal_corr - val[mtot_corr - 1] + val[0];
409 while (mtire <
Mtotal - 1) {
413 if (
bound[bb] == 1) {
429 Int_t mtot_corr = val.size();
434 for (
Int_t ii = 1; ii < mtot_corr; ii += 1) {
435 taille = val[ii] - val[ii - 1];
437 size[ii - 1] += taille;
480 surplus[mm] =
TMath::Nint(val[mm] * Ztotal_corr / sum_val);
485 if (zc != Ztotal_corr) {
486 Int_t diff = Ztotal_corr - zc;
506 size[mm] += surplus[mm];
511 if (zc ==
Ztotal)
return 1;
536 Int_t mc = 0, zc = 0;
626 for (
Int_t nn = 0; nn < times; nn += 1) {
627 if (nn % 10000 == 0)
Info(
"BreakNtimes",
"%d partitions generees sur %d", nn, times);
637 Info(
"BreakNtimes",
"Tirage termine");
677 for (
Int_t nn = 0; nn < times; nn += 1) {
678 if (nn % 1000 == 0) printf(
"%d partitions generees sur %d\n", nn, times);
683 if (mt > 0 && zt > 0 && zt >= mt * zmin) {
700 Info(
"BreakNtimesOnGaussian",
"Temps ecoule en secondes : %d",
GetDeltaTime());
730 while (!(mt > 0 && zt > 0 && zt >= mt * zmin)) {
778 TH2F* h2 = hh_zt_VS_mt;
796 if (mt > 0 && zt > 0 && zt >= mt * zmin) {
799 for (
Int_t nn = 0; nn < stat; nn += 1) {
804 if (stat_par % 1000 == 0) printf(
"%d partitions generees sur %d\n", stat_par, stat_tot);
807 cout << zt <<
" " << mt << endl;
815 Info(
"BreakNtimesFromHisto",
"Temps ecoule en secondes : %d",
GetDeltaTime());
897 if (!(
c1 = (
TCanvas*)
gROOT->GetListOfCanvases()->FindObject(
"BreakUp_Control"))) {
899 c1 =
new TCanvas(
"BreakUp_Control",
"Control", 0, 0, 900, 900);
900 c1->Divide(2, 2, 0.001, 0.001, 10);
968 Info(
"Print",
"Configuration for the break up");
970 printf(
" Charge to be distributed %d - Biggest possible charge %d\n",
nbre_nuc,
Zmin +
nbre_nuc);
974 printf(
"------------------------------------------------------");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Permet de casser aleatoirement un nombre entier (ztot) en un nombre (mtot) d'entiers plus petits d'un...
void BreakFromHisto(TH2F *hh_zt_VS_mt, Int_t zmin=1)
virtual void SaveHistos(KVString filename="", KVString suff="", Option_t *option="recreate")
Int_t GetTotalIterations(void)
KVEvent * BreakOnGaussian(Double_t Ztot_moy, Double_t Ztot_rms, Double_t Mtot_moy, Double_t Mtot_rms, Int_t zmin)
virtual void ResetHistos()
Met a zero le contenu des histogrammes.
void DefineBreakUpMethod(KVString bup_method="")
virtual void TreatePartition()
Int_t GetZtot(void) const
Retourne le nombre entier a casser.
void Clear(Option_t *="")
KVHashList * GetObjects()
Retourne la liste d'objects autres ...
virtual ~KVBreakUp()
Destructeur.
KVIntegerList * partition
void SetZmin(Int_t zlim)
Protected method.
KVString GetBreakUpMethod(void) const
Retourne methode de cassure.
Int_t BreakUsingPile()
Methode de cassure.
Int_t BreakUsingIndividual()
void StorePartitions(Bool_t choix=kTRUE)
si choix=kTRUE, on enregistre les partitions
void LinkEvent(KVEvent *)
void BreakNtimes(Int_t times=1000)
KVEvent * GetCurrentEvent()
void BreakNtimesOnGaussian(Int_t times, Double_t Ztot_moy, Double_t Ztot_rms, Double_t Mtot_moy, Double_t Mtot_rms, Int_t zmin=1)
KVBreakUp(Int_t taille_max=1000)
void SetZtot(Int_t zt)
Protected method.
Int_t GetZmin(void) const
Retourne la taille minimale des entiers apres cassure.
void SetConditions(Int_t zt, Int_t mt, Int_t zmin=1)
void RedefineTRandom(KVString TRandom_Method)
virtual void ResetTotalIterations()
Comme c'est ىcrit.
Int_t * bound
[Ztotal] tableau permettant de gérer les cassures de liens
Int_t GetMtot(void) const
Retourne le nombre d'entiers apres cassure (la multiplicite)
virtual void DefineHistos()
void SetMtot(Int_t mt)
Protected method.
void SetBreakUpMethod(KVString bup_method)
Protected method.
Abstract base class container for multi-particle events.
void Clear(Option_t *opt="")
static KVEvent * Factory(const char *plugin)
Extended version of ROOT THashList.
Handle a list of positive integers (partition)
Int_t * CreateTableOfValues()
void Fill(Int_t *tab, Int_t mult)
void Fill(TArrayI* tab);
void SetZ(Int_t z, Char_t mt=-1)
void Add(Int_t)
Add value 'n' to the list.
IntArray GetArray() const
virtual Bool_t Fill(KVIntegerList *par)
void Clear(Option_t *option="")
Mise a zero de la liste.
virtual void Execute(const char *method, const char *params, Int_t *error=0)
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual Double_t GetBinCenter(Int_t bin) const
virtual Int_t GetEntries() const
virtual Int_t GetNbinsY() const
virtual Int_t GetNbinsX() const
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual Double_t GetEntries() const
virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Option_t *option="") const
virtual Double_t GetBinContent(Int_t bin) const
static const EReturnType kLong
void InitWithPrototype(const char *function, const char *proto, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
void Print(Option_t *option="") const override
virtual const char * GetName() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
virtual Double_t Uniform(Double_t x1, Double_t x2)
TClass * IsA() const override
const char * Data() const
void Form(const char *fmt,...)