+ /**
+ * Enum for reference flow (eta-gap) mode
+ */
+ enum EFillFlow {
+ kFillRef = 0x1,
+ kFillDiff = 0x2,
+ kFillBoth = 0x3
+ };
+ // ----------------- Being nested class ---------------------
+ /**
+ * Nested class to handle cumulant calculations in vertex bins
+ */
+ class VertexBin : public TNamed
+ {
+ public:
+ /*
+ * Constructor
+ */
+ VertexBin();
+ /**
+ * Constructor
+ *
+ * @param vLow Min vertex z-coordinate
+ * @param vHigh Max vertex z-coordinate
+ * @param moment Flow moment
+ * @param type Data type (FMD/SPD/FMDTR/SPDTR/MC)
+ * @param flags Flags
+ * @param cut Cut value
+ * @param etaGap @f$\eta@f$ gap
+ */
+ VertexBin(Int_t vLow, Int_t vHigh,
+ UShort_t moment, TString type,
+ UShort_t flags = kSymEta,
+ Double_t cut = -1, Double_t etaGap = 2.);
+ /**
+ * Copy constructor
+ *
+ * @param o Object to copy from
+ *
+ * @return VertexBin
+ */
+ VertexBin(const VertexBin& o);
+ /**
+ * Assignment operator
+ *
+ * @param v Object to assing from
+ *
+ * @return reference to this
+ */
+ VertexBin& operator=(const VertexBin& v);
+ /**
+ * Destructor
+ */
+ ~VertexBin(){}
+ /**
+ * Add vertex bin output to list
+ *
+ * @param list Histograms are added to this list
+ *
+ * @return void
+ */
+ virtual void AddOutput(TList* list);
+ /**
+ * Fill reference and differential flow histograms for analysis
+ *
+ * @param dNdetadphi 2D data histogram
+ * @param cent Centrality
+ * @param mode fill ref/diff or both
+ *
+ * @return false if bad event (det. hotspot)
+ */
+ Bool_t FillHists(const TH2D& dNdetadphi, Double_t cent, EFillFlow mode = kFillBoth);
+ /**
+ * Do cumulants calculations for current event with
+ * centrality cent
+ *
+ * @param cent Event centrality
+ * @param skipFourP Skip ?
+ *
+ * @return void
+ */
+ void CumulantsAccumulate(Double_t cent, Bool_t skipFourP = kFALSE);
+ /**
+ * Finish cumulants calculations. Takes input and
+ * output lists in case Terminate is called separately
+ *
+ * @param inlist List with input histograms
+ * @param outlist List with output histograms
+ *
+ * @return void
+ */
+ void CumulantsTerminate(TList* inlist, TList* outlist);
+
+ protected:
+ /*
+ * Enumeration for ref/diff histograms
+ */
+ enum { kHmultA = 1, kHmultB, kHQnReA, kHQnImA, kHQnReB, kHQnImB, kHQ2nRe, kHQ2nIm };
+ /*
+ * Enumeration for cumulant histograms
+ */
+ enum { kW2Two = 1,
+ kW2,
+ kW4Four,
+ kW4,
+ kQnReA,
+ kQnImA,
+ kMA,
+ kQnReB,
+ kQnImB,
+ kMB,
+ kCosphi1phi2,
+ kSinphi1phi2,
+ kCosphi1phi2phi3m,
+ kSinphi1phi2phi3m,
+ kMm1m2,
+ kw2two,
+ kw2,
+ kw4four,
+ kw4,
+ kpnRe,
+ kpnIm,
+ kmp,
+ kCospsi1phi2,
+ kSinpsi1phi2,
+ kCospsi1phi2phi3m,
+ kSinpsi1phi2phi3m,
+ kmpmq,
+ kCospsi1phi2phi3p,
+ kSinpsi1phi2phi3p };
+ /**
+ * Set centrality axis
+ *
+ * @param axis Centrality axis
+ *
+ * @return void
+ */
+ void SetupCentAxis(TAxis* axis);
+
+ const UShort_t fMoment; // flow moment
+ const Int_t fVzMin; // z-vertex min must be in whole [cm]
+ const Int_t fVzMax; // z-vertex max must be in whoe [cm]
+ TString fType; // data type
+ const UShort_t fFlags; // Flow flags, e.g., eta-gap sat. vtx
+ const Double_t fSigmaCut; // Detector specific cut for outlier events
+ const Double_t fEtaGap; // Eta gap value
+ TH2D* fCumuRef; // histogram for reference flow
+ TH2D* fCumuDiff; // histogram for differential flow
+ TH3D* fCumuHist; // histogram for cumulants calculations
+ TH2F* fdNdedpAcc; // Diagnostics histogram to make acc. maps
+ TH2F* fOutliers; // Sigma <M> histogram
+ UShort_t fDebug; // Debug flag
+
+ ClassDef(VertexBin, 3); // object for cumulants ananlysis in FMD
+ };
+ // ---------- End of nested class -------------