10#include "Femto3DCFQinv.h"
11#include "FemtoConst.h"
14#include <TCollection.h>
18#include <TVirtualPad.h>
21 Femto3DCFQinv::Femto3DCFQinv(TString name, Femto::EKinematics frame) : Femto3DCF(name, frame), fPureNum(NULL), fQinvNum(NULL) {
23 fPureNum = (TH3D*) GetNum()->Clone(
"qinvN");
24 fQinvNum = (TH3D*) GetNum()->Clone(
"qinvD");
28 Femto3DCFQinv::Femto3DCFQinv(TString name,
38 Femto::EKinematics frame) :
39 Femto3DCF(name, binsX, minX, maxX, binsY, minY, maxY, binsZ, minZ, maxZ, frame) {
40 fPureNum = (TH3D*) GetNum()->Clone(
"qinvN");
41 fQinvNum = (TH3D*) GetNum()->Clone(
"qinvD");
44 Femto3DCFQinv::Femto3DCFQinv(
const Femto3DCFQinv& other) : Femto3DCF(other) {
45 fPureNum = (TH3D*) other.fPureNum->Clone(
"qinvN");
46 fQinvNum = (TH3D*) other.fQinvNum->Clone(
"qinvD");
49 void Femto3DCFQinv::FillNumObj(TObject* obj) {
51 Double_t x = pair->
GetX();
52 Double_t y = pair->
GetY();
53 Double_t z = pair->
GetZ();
59 ((TH3*) fNum)->Fill(x, y, z, pair->
GetWeight());
60 ((TH3*) fPureNum)->Fill(x, y, z);
61 ((TH3*) fQinvNum)->Fill(x, y, z, pair->
GetT());
64 TH3D* Femto3DCFQinv::GetQinvHist(TString opt)
const {
66 TH3D* div = (TH3D*) fQinvNum->Clone(
"ratio");
67 div->Divide(fPureNum);
73 Long64_t Femto3DCFQinv::Merge(TCollection* collection) {
76 TIter iterator(collection);
86 DividedHisto3D::operator=(other);
87 if (fPureNum)
delete fPureNum;
88 if (fQinvNum)
delete fQinvNum;
89 fPureNum = (TH3D*) other.fPureNum->Clone();
90 fQinvNum = (TH3D*) other.fQinvNum->Clone();
95 void Femto3DCFQinv::Add(
const Object* h) {
99 fPureNum->Add(cf->fPureNum);
100 fQinvNum->Add(cf->fQinvNum);
104 void Femto3DCFQinv::AddNum(TH1* num, Option_t* opt) {
105 Femto3DCF::AddNum(num, opt);
110 fPureNum = (TH3D*) GetNum()->Clone(
"qinvN");
111 fQinvNum = (TH3D*) GetNum()->Clone(
"qinvD");
114 void Femto3DCFQinv::AddDen(TH1* den, Option_t* opt) { Femto3DCF::AddDen(den, opt); }
116 void Femto3DCFQinv::Browse(TBrowser* b) {
117 TVirtualPad* c1 = gPad;
121 b->SetDrawOption(
"colz");
124 b->Add(GetQinvHist(
"av"));
127 Femto3DCFQinv::Femto3DCFQinv() :
Femto3DCF(), fPureNum(nullptr), fQinvNum(nullptr) {}
129 Femto3DCFQinv::~Femto3DCFQinv() {
139 fPureNum->Add(other2.fPureNum, scale);
140 fQinvNum->Add(other2.fQinvNum, scale);
virtual void AddScaled(const DividedHisto1D &other, Double_t scale=1)
virtual void AddScaled(const Hal::DividedHisto1D &other, Double_t scale)
Double_t GetWeight() const