10#include "SimpleVnAnalysis.h"
13#include "CutContainer.h"
14#include "DividedHisto.h"
44 Double_t phi = TMath::ATan2(py, px);
45 Double_t Phi = GetPhi();
46 Double_t v2N = TMath::Cos(fN * (phi - Phi));
52 div->FillNum(valueX, v2N);
53 div->FillDen(valueX, 1);
69 if (nbins < 0) { nbins = 100; }
85 Cout::PrintInfo(Form(
"Wrong SetAxis option in %s", this->ClassName()), EInfo::kLowWarning);
97 return Task::EInitFlag::kFATAL;
100 Cout::PrintInfo(
"No FlowVariable on Y, it will be empty", EInfo::kLowWarning);
105 if (!fVarX->Init(
GetTaskID())) {
return Task::EInitFlag::kERROR; }
106 if (!fVarY->Init(
GetTaskID()) && fNDim == 2) {
return Task::EInitFlag::kERROR; }
113 fHistos[i] =
new DividedHisto1D(Form(
"V_{%i}[%i]", (
int) fN, i), axX,
'D');
114 fHistos[i]->
GetNum()->GetYaxis()->SetTitle(axY.GetTitle());
115 fHistos[i]->
GetDen()->GetYaxis()->SetTitle(axY.GetTitle());
116 fHistos[i]->
SetAxisName(Form(
"v_{%i RP}", (
int) fN));
123 fHistos[i] =
new DividedHisto2D(Form(
"V_{%i}[%i]", (
int) fN, i), axX, axY,
'D');
124 fHistos[i]->
GetNum()->GetZaxis()->SetTitle(axZ.GetTitle());
125 fHistos[i]->
GetDen()->GetZaxis()->SetTitle(axZ.GetTitle());
126 fHistos[i]->
SetAxisName(Form(
"v_{%i RP}", (
int) fN));
133 return Task::EInitFlag::kSUCCESS;
135 return Task::EInitFlag::kFATAL;
162 Cout::PrintInfo(
"Only 1 event cut container allowed for SimpleVnAnalysis", EInfo::kError);
177 fHistos = new DividedHisto1D*[fTrackCollectionsNo];
178 for (int i = 0; i < ana.fTrackCollectionsNo; i++) {
179 fHistos[i] = (DividedHisto1D*) ana.fHistos[i]->Clone();
182 if (ana.fVarX) fVarX = ana.fVarX->MakeCopy();
183 if (ana.fVarY) fVarY = ana.fVarY->MakeCopy();
186 SimpleVnAnalysis::~SimpleVnAnalysis() {
187 for (
int i = 0; i < fTrackCollectionsNo; i++) {
193 void SimpleVnAnalysis::SetFlowVariableX(
const FlowVariable& var) { fVarX = var.MakeCopy(); }
195 void SimpleVnAnalysis::SetFlowVariableY(
const FlowVariable& var) { fVarY = var.MakeCopy(); }
static void PrintInfo(TString text, Hal::EInfo status)
void LinkCollections(ECutUpdate opt_low, Int_t in_low, ECutUpdate opt_high, Int_t in_high)
void RemoveCollection(ECutUpdate update, Int_t collection)
Int_t GetEventCollectionsNo() const
Int_t GetTrackCollectionsNo() const
void SetAxisName(TString name)
CutContainer * fCutContainer
void AddToAnaMetadata(Package *main_pack, TObject *obj) const
virtual TString GetAxisUnit()
virtual Double_t GetVariable(Track *p)
virtual TString GetAxisName()
void AddObject(TObject *object)
virtual void CheckCutContainerCollections()
SimpleVnAnalysis(Double_t n=2)
virtual void LinkCollections()
void SetAxis(Int_t nbins, Double_t min, Double_t max, Char_t axis='x')
virtual Task::EInitFlag Init()
virtual void ProcessTrack()
virtual Task::EInitFlag Init()
Int_t fCurrentTrackCollectionID
virtual Package * Report() const
Int_t fTrackCollectionsNo
virtual void CheckCutContainerCollections()