Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CorrFitInfo.cxx
1/*
2 * CorrFitInfo.cxx
3 *
4 * Created on: 10 kwi 2020
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "CorrFitInfo.h"
10
11#include "Cout.h"
12
13#include "Femto1DCF.h"
14#include "Femto3DCF.h"
15#include "FemtoSHCF.h"
16
17#include <iostream>
18
19namespace Hal {
20 CorrFitInfo::CorrFitInfo() : TNamed(), fCF(nullptr), fMacroText(""), fPairFile(""), fVertical(kFALSE) { SetName("Info"); }
21
22 CorrFitInfo::~CorrFitInfo() {
23 if (fCF) delete fCF;
24 }
25
26 void CorrFitInfo::Print(Option_t* /*option*/) const {
27 Cout::InStars("CorrFitInfo", kWhite);
28 fCF->Print();
29 fSetup.Print("");
30 Cout::Text(Form("Pair File : %s", fPairFile.Data()), "R", kWhite);
31 Cout::InStars("Macro text", kWhite);
32 std::cout << fMacroText << std::endl;
33 }
34
35 CorrFitInfo::CorrFitInfo(const CorrFitInfo& other) : TNamed() {
36 SetName(other.GetName());
37 fCF = other.fCF->Clone();
38 fMacroText = other.fMacroText;
39 fPairFile = other.fMacroText;
40 fSetup = other.fSetup;
41 fVertical = other.fVertical;
42 }
43
44 Int_t CorrFitInfo::GetMainBins() const {
45 if (!fCF) return 0;
46 if (dynamic_cast<Hal::FemtoSHCF*>(fCF)) { return ((Hal::FemtoSHCF*) fCF)->GetNum()->GetNbinsX(); }
47 if (dynamic_cast<Hal::Femto1DCF*>(fCF)) { return ((Hal::Femto1DCF*) fCF)->GetNum()->GetNbinsX(); }
48 if (dynamic_cast<Hal::Femto3DCF*>(fCF)) { return ((Hal::Femto3DCF*) fCF)->GetNum()->GetNbinsZ(); }
49 return 0;
50 }
51
52} // namespace Hal