50 tname =
"PartitionTree";
197 tree->Branch(
"ztot", &
ztot,
"ztot/I");
198 tree->Branch(
"mtot", &
mtot,
"mtot/I");
199 tree->Branch(
"tabz",
tabz,
"tabz[mtot]/I");
239 Int_t ncouple[nb_cassure];
240 Int_t niter[nb_cassure];
241 for (
Int_t nc = 0; nc < nb_cassure; nc += 1) {
249 for (nc = 0; nc < nb_cassure; nc += 1) {
257 if (niter[nc] < ncouple[nc]) {
259 zdispo = coup[nc]->
GetZ2(niter[nc]);
260 zsup = coup[nc]->
GetZ1(niter[nc]);
271 while (niter[nc] < ncouple[nc]) {
276 for (
Int_t ii = 0; ii <
kmt; ii += 1)
293 Int_t previous = nc - 1;
294 while (niter[previous] == (ncouple[previous] - 1) && previous >= 0) {
296 delete coup[previous];
300 if (previous < 0)
break;
307 niter[previous] += 1;
308 zdispo = coup[previous]->
GetZ2(niter[previous]);
309 zsup = coup[previous]->
GetZ1(niter[previous]);
313 for (
Int_t ncbis = previous + 1; ncbis < nb_cassure; ncbis += 1) {
315 coup[ncbis] =
new KVCouple(zdispo, zsup,
kmt - ncbis);
321 if (niter[ncbis] < ncouple[ncbis]) {
323 zdispo = coup[ncbis]->
GetZ2(niter[ncbis]);
324 zsup = coup[ncbis]->
GetZ1(niter[ncbis]);
413 if (
cname ==
"")
cname.
Form(
"Partitions_Zf%d_Zi%d.root", Ztot, Zinf);
417 Int_t mtmax = Ztot / Zinf;
419 if (min != -1 && min <= mtmax)
422 if (max != -1 && max <= mtmax && max >= mtmin)
425 for (
Int_t Mtot = mtmin; Mtot <= mtmax; Mtot += 1) {
430 Info(
"BreakUsing_Ztot_Zinf_Criterion",
"%lf partitions crees en %d seconds",
npar,
GetDeltaTime());
453 if (
cname ==
"")
cname.
Form(
"Partitions_Zt%d_Mt%d_Zi%d.root", Ztot, Mtot, Zinf);
459 Info(
"BreakUsing_Ztot_Mtot_Zinf_Criterion",
"%lf partitions crees en %d seconds",
npar,
GetDeltaTime());
482 if (
cname ==
"")
cname.
Form(
"Partitions_Zt%d_Zm%d_Zi%d.root", Ztot, Zmax, Zinf);
488 else if (Ztot - Zmax >= Zinf) {
498 cp =
new KVCouple(Ztot, Zmax, mfmin);
501 printf(
"a priori mfmin=%d OK\n", mfmin);
503 printf(
"%d %d\n", cp->
GetZ1(ii), cp->
GetZ2(ii));
509 Int_t mfmax = ((Ztot - Zmax) / Zinf) + 1;
511 cp =
new KVCouple(Ztot, Zmax, mfmax);
517 cp =
new KVCouple(Ztot, Zmax, mfmax);
520 printf(
"a priori mfmax=%d OK\n", mfmax);
522 printf(
"%d %d\n", cp->
GetZ1(ii), cp->
GetZ2(ii));
528 for (
Int_t Mtot = mfmin; Mtot <= mfmax; Mtot += 1) {
537 printf(
"%d %d ??? \n", Ztot - Zmax, Zinf);
541 Info(
"BreakUsing_Ztot_Zmax_Zinf_Criterion",
"%lf partitions crees en %d seconds",
npar,
GetDeltaTime());
563 if (
cname ==
"")
cname.
Form(
"Partitions_Mt%d_Zm%d_Zi%d.root", Mtot, Zmax, Zinf);
566 Int_t ztmin = Zmax + (Mtot - 1) * Zinf;
567 Int_t ztmax = Zmax * Mtot;
569 for (
Int_t Ztot = ztmin; Ztot <= ztmax; Ztot += 1) {
577 Info(
"BreakUsing_Mtot_Zmax_Zinf_Criterion",
"%lf partitions crees en %d seconds",
npar,
GetDeltaTime());
619 Info(
"WriteTreeAndCloseFile",
"Ecriture du fichier:\n%s avec l'arbre:\n %s (%lld entrees)",
gFile->GetName(),
tree->GetName(),
tree->GetEntries());
620 tree->ResetBranchAddresses();
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
Handles binary decomposition of an integer.
Permet de determiner numeriquement et exactement un ensemble de partitions d'entrees remplissante cer...
void SetPathForFile(KVString path)
Int_t tstart
To give an estimation of time consuming.
void BreakUsing_Ztot_Zmax_Zinf_Criterion(Int_t Ztot, Int_t Zmax, Int_t Zinf, KVString chain_name="")
KVString kwriting_path
Chemin ou les arbres seront ecrits.
virtual ~KVPartitionGenerator()
Destructor.
void BreakUsing_Ztot_Zinf_Criterion(Int_t Ztot, Int_t Zinf, KVString chain_name="", Int_t min=-1, Int_t max=-1)
void MakePartitions(Int_t Ztot, Int_t Mtot, Int_t Zinf)
virtual void WriteTreeAndCloseFile()
void BreakUsing_Ztot_Mtot_Zinf_Criterion(Int_t Ztot, Int_t Mtot, Int_t Zinf, KVString chain_name="")
virtual void TreatePartition()
void SetConditions(Int_t Ztot, Int_t Mtot, Int_t Zinf)
Double_t npar
Compteurs de nombre de partitions crees.
void BreakUsing_Mtot_Zmax_Zinf_Criterion(Int_t Mtot, Int_t Zmax, Int_t Zinf, KVString chain_name="")
virtual void SetOwner(Bool_t enable=kTRUE)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)
virtual Int_t AddFile(const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="")
virtual const char * GetName() const
const char * Data() const
void Form(const char *fmt,...)
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)