1 #ifndef ALIFLOWVZERORESULTS_H
2 #define ALIFLOWVZERORESULTS_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /* $Id: AliFlowVZEROResults.h 49869 2011-05-18 04:49:51Z fnoferin $ */
10 /////////////////////////////////////////////////
12 // output v2-VZERO Class //
13 // noferini@bo.infn.it //
14 /////////////////////////////////////////////////
17 #include "TClonesArray.h"
21 class AliFlowVZEROResults : public TNamed
24 AliFlowVZEROResults(const char *name,const Int_t nvar,const Int_t* binVar);
25 AliFlowVZEROResults();
26 ~AliFlowVZEROResults();
27 AliFlowVZEROResults(const AliFlowVZEROResults &old);
28 AliFlowVZEROResults& operator=(const AliFlowVZEROResults &source);
30 Int_t GetNhistos() const {return fV2->GetEntries();};
31 Int_t GetNspecies() const;
32 TProfile *GetV2(Int_t histo) const {return ((TProfile *) fV2->At(histo));};
33 TProfile *GetV2(Int_t species,Float_t x[]) const;
34 TProfile *GetV2(Int_t species,Float_t xMin[],Float_t xMax[]) const;
35 TProfile *GetV2reweight(Int_t species,Float_t xMin[],Float_t xMax[],Int_t varRW,Float_t rw[]) const;
36 void DirectFill(Int_t histo,Float_t pt,Float_t v2){GetV2(histo)->Fill(pt,v2);};
37 void Fill(Int_t species,Float_t pt,Float_t v2,Float_t x[]);
39 void AddSpecies(const char *name,Int_t nXbin,const Double_t *bin);
41 const char *GetSpeciesName(Int_t species){if(species < GetNspecies()) return GetV2(species*GetNhistos()/GetNspecies())->GetName();else return "";};
43 Int_t Add(const AliFlowVZEROResults *oth);
45 Int_t GetNvar() const {return fNbinVar->GetSize();};
46 Int_t GetNbinVar(Int_t ivar) const {return (*fNbinVar)[ivar];};
48 void SetVarRange(Int_t ivar,Float_t xMin,Float_t xMax);
49 void SetVarName(Int_t ivar,const char *name){TNamed *atemp = (TNamed *) fNameVar->At(ivar); atemp->SetName(name);};
51 Float_t GetXmin(Int_t ivar) const {return (*fXmin)[ivar];};
52 Float_t GetXmax(Int_t ivar) const {return (*fXmax)[ivar];};
53 const char *GetVarName(Int_t ivar) const {TNamed *atemp = (TNamed *) fNameVar->At(ivar); return atemp->GetName();};
55 Int_t GetBin(Int_t ivar,Float_t x) const {return Int_t((x-(*fXmin)[ivar])/((*fXmax)[ivar]-(*fXmin)[ivar])*(*fNbinVar)[ivar]);};
57 Long64_t Merge(TCollection* list);
63 TArrayF *fXmin,*fXmax;
64 TClonesArray *fNameVar;
69 ClassDef(AliFlowVZEROResults,1) // v2 vzero outuput object