10#include "FemtoSourceModel.h"
13#include "FemtoSourceDensity.h"
34 fParametersNo(TMath::Max(1, params_no)), fRandom(new TRandom2()), fRout(0), fRside(0), fRlong(0), fModelName(
"unknown") {
35 fParameterNames =
new TString[fParametersNo];
36 fParams =
new Double_t[fParametersNo];
41 fParametersNo(model.fParametersNo),
42 fRandom(new TRandom2()),
46 fModelName(model.fModelName) {
47 fParameterNames =
new TString[fParametersNo];
48 fParams =
new Double_t[fParametersNo];
49 for (
int i = 0; i < fParametersNo; i++) {
50 fParameterNames[i] = model.fParameterNames[i];
51 fParams[i] = model.fParams[i];
53 if (model.
fDensity) { fDensity = (FemtoSourceDensity*) model.fDensity->Clone(); }
59 for (
int i = 0; i <
GetNpar(); i++) {
67 if (n >= fParametersNo)
return "";
68 return fParameterNames[n];
72 for (
int i = 0; i < fParametersNo; i++) {
73 if (name == fParameterNames[i]) {
81 if (!
fDensity)
return ENumProperty::kNonAnalytical;
85 return ENumProperty::kNonAnalytical;
88 FemtoSourceModel::~FemtoSourceModel() {
91 if (fParams)
delete[] fParams;
92 if (fParameterNames)
delete[] fParameterNames;
96 FemtoSourceModel1D::FemtoSourceModel1D(Int_t par) : FemtoSourceModel(par) {
101 FemtoSourceModel1D::FemtoSourceModel1D() : FemtoSourceModel1D(1) {}
105 FemtoSourceModel1D::~FemtoSourceModel1D() {}
109 FemtoSourceModel3D::FemtoSourceModel3D() : FemtoSourceModel3D(3) {}
111 FemtoSourceModel3D::FemtoSourceModel3D(Int_t no) : FemtoSourceModel(no) {
116 SetParName(0,
"R_{out}");
117 SetParName(1,
"R_{side}");
118 SetParName(2,
"R_{long}");
130 FemtoSourceModel3D::~FemtoSourceModel3D() {}
132 void FemtoSourceModel::Print(Option_t* )
const {
135 for (
int i = 0; i <
GetNpar(); i++) {
static void Text(TString text, TString option="L", Color_t color=-1)
static void Database(Int_t no...)
void SetSideRadius(Double_t side)
virtual void SetRadius(Double_t radii)
void SetLongRadius(Double_t longr)
void SetOutRadius(Double_t out)
void SetParameter(Int_t par_no, Double_t par_val)
virtual Package * Report() const
Double_t GetParameter(Int_t n) const
void SetParameterByName(TString name, Double_t par)
ENumProperty GetModelNumProp() const
FemtoSourceModel(Int_t nparams=1)
TString GetParamName(Int_t n) const
FemtoSourceDensity * fDensity
void AddObject(TObject *object)