KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVPartitionFunction.h
1
3
4#ifndef __KVPARTITIONFUNCTION_H
5#define __KVPARTITIONFUNCTION_H
6
7#include "TNamed.h"
8#include "TString.h"
9#include "THashTable.h"
10
57
62
63 Double_t sneppen_Nclass(int A, int Z, int M, int B);
64 Double_t sneppen_Np(int A, int Z, int M);
65 Double_t calc_sneppen_Nclass(int A, int Z, int M, int B);
66 Double_t calc_sneppen_Np(int A, int Z, int M);
67
68 const Char_t* name_value(Int_t A, Int_t Z, Int_t M, Int_t B = -1)
69 {
70 if (B > -1) return Form("A%dZ%dM%dB%d", A, Z, M, B);
71 return Form("A%dZ%dM%d", A, Z, M);
72 }
73
74 void store_value(Double_t val, Int_t A, Int_t Z, Int_t M, Int_t B = -1)
75 {
76 TString name = name_value(A, Z, M, B);
77 TNamed* o = new TNamed(name.Data(), "");
78 o->SetTitle(Form("%f", val));
79 fTable.Add(o);
80 }
81
83 {
84 TString name = name_value(A, Z, M, B);
85 TNamed* o = (TNamed*)fTable.FindObject(name.Data());
86 if (!o) return -1.;
87 Double_t val;
88 sscanf(o->GetTitle(), "%lf", &val);
89 return val;
90 }
91
92public:
94 virtual ~KVPartitionFunction();
95
96 Double_t PartFunc(int A, int M);
97 Double_t PartSum(int A);
98 Double_t PartFunc(int A, int Z, int M);
99 Double_t PartSum(int A, int Z);
100
102 {
103 return maxvalueNp;
104 };
106 {
107 return maxvalueNclass;
108 };
109
110 Double_t MeanNA(int A0, int A);
111 Double_t MeanNA_M(int A0, int A, int M);
112 Double_t MeanNA(int A0, int Z0, int A);
113 Double_t MeanNZ(int A0, int Z0, int Z);
114 Double_t MeanNAZ(int A0, int Z0, int A, int Z);
115
116 Double_t MeanM(int A0);
117 Double_t MeanA(int A0);
118
119 ClassDef(KVPartitionFunction, 0) //Calculates number of partitions of A or (A,Z) into fragments
120};
121
122#endif
int Int_t
char Char_t
double Double_t
#define ClassDef(name, id)
char name[80]
char * Form(const char *fmt,...)
Calculates number of partitions of (A,Z,M)
const Char_t * name_value(Int_t A, Int_t Z, Int_t M, Int_t B=-1)
Double_t get_value(Int_t A, Int_t Z, Int_t M, Int_t B=-1)
Double_t sneppen_Np(int A, int Z, int M)
Double_t PartFunc(int A, int M)
Double_t MeanNAZ(int A0, int Z0, int A, int Z)
Double_t MeanNA(int A0, int A)
KVPartitionFunction()
Default constructor.
Double_t GetMaxValueNclass() const
Double_t calc_sneppen_Np(int A, int Z, int M)
calculates Eq. 4
Double_t GetMaxValueNp() const
Double_t calc_sneppen_Nclass(int A, int Z, int M, int B)
calculates Eqs. 5a-d
Double_t sneppen_Nclass(int A, int Z, int M, int B)
Double_t MeanNZ(int A0, int Z0, int Z)
void store_value(Double_t val, Int_t A, Int_t Z, Int_t M, Int_t B=-1)
virtual ~KVPartitionFunction()
Destructor.
Double_t MeanNA_M(int A0, int A, int M)
void Add(TObject *obj) override
TObject * FindObject(const char *name) const override
virtual void SetTitle(const char *title="")
const char * GetTitle() const override