AliPhysics  608b256 (608b256)
AliFlowVZEROResults.h
Go to the documentation of this file.
1 #ifndef ALIFLOWVZERORESULTS_H
2 #define ALIFLOWVZERORESULTS_H
3 
4 
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice */
7 
8 /* $Id: AliFlowVZEROResults.h 49869 2011-05-18 04:49:51Z fnoferin $ */
9 
11 // //
12 // output v2-VZERO Class //
13 // noferini@bo.infn.it //
15 
16 #include "TProfile.h"
17 #include "TClonesArray.h"
18 #include "TArrayI.h"
19 #include "TArrayF.h"
20 
22 {
23  public:
24  AliFlowVZEROResults(const char *name,const Int_t nvar,const Int_t* binVar);
29 
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[]);
38 
39  void AddSpecies(const char *name,Int_t nXbin,const Double_t *bin);
40 
41  const char *GetSpeciesName(Int_t species){if(species < GetNspecies()) return GetV2(species*GetNhistos()/GetNspecies())->GetName();else return "";};
42 
43  Int_t Add(const AliFlowVZEROResults *oth);
44 
45  Int_t GetNvar() const {return fNbinVar->GetSize();};
46  Int_t GetNbinVar(Int_t ivar) const {return (*fNbinVar)[ivar];};
47 
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);};
50 
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();};
54 
55  Int_t GetBin(Int_t ivar,Float_t x) const {return Int_t((x-(*fXmin)[ivar])/((*fXmax)[ivar]-(*fXmin)[ivar])*(*fNbinVar)[ivar]);};
56 
57  Long64_t Merge(TCollection* list);
58 
59  void Reset();
60 
61  private:
63  TArrayF *fXmin,*fXmax;
64  TClonesArray *fNameVar;
65 
66  TClonesArray *fV2;
67 
68 
69  ClassDef(AliFlowVZEROResults,1) // v2 vzero outuput object
70 };
71 #endif
72 
73 
double Double_t
Definition: External.C:58
long long Long64_t
Definition: External.C:43
void DirectFill(Int_t histo, Float_t pt, Float_t v2)
AliFlowVZEROResults & operator=(const AliFlowVZEROResults &source)
Float_t GetXmax(Int_t ivar) const
void Fill(Int_t species, Float_t pt, Float_t v2, Float_t x[])
Int_t GetNhistos() const
void SetVarName(Int_t ivar, const char *name)
Int_t Add(const AliFlowVZEROResults *oth)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
Int_t GetNbinVar(Int_t ivar) const
TProfile * GetV2(Int_t histo) const
const char * GetSpeciesName(Int_t species)
void AddSpecies(const char *name, Int_t nXbin, const Double_t *bin)
Int_t GetBin(Int_t ivar, Float_t x) const
void SetVarRange(Int_t ivar, Float_t xMin, Float_t xMax)
Float_t GetXmin(Int_t ivar) const
const char * GetVarName(Int_t ivar) const
TProfile * GetV2reweight(Int_t species, Float_t xMin[], Float_t xMax[], Int_t varRW, Float_t rw[]) const
Long64_t Merge(TCollection *list)