]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnValue.h
Update to the analysis on MC data only.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnValue.h
index 65ddf65c1d5ab5de0ccecb8f90af3bce32cf2b81..2342878ce06ad7363664673dfc5e44b750319a6a 100644 (file)
@@ -9,16 +9,18 @@
 #ifndef ALIRSNVALUE_H
 #define ALIRSNVALUE_H
 
+#include "TNamed.h"
+#include "TArrayD.h"
+
 class AliRsnPairDef;
+class AliRsnMother;
 
-class AliRsnValue : public TObject
+class AliRsnValue : public TNamed
 {
   public:
 
-    enum EAxisType
+    enum EValueType
     {
-      kTrackPt,
-      kTrackEta,
       kTrack1P,
       kTrack2P,
       kTrack1Pt,
@@ -30,31 +32,44 @@ class AliRsnValue : public TObject
       kPairEta,
       kPairMt,
       kPairY,
+      kPairCosThetaStar,
+      kPairCosThetaStar1,
+      kPairCosThetaStar2,
+      kPairCosThetaStarMC1,
+      kPairCosThetaStarMC2,
       kEventMult,
-      kAxisTypes
+      kValueTypes
     };
 
-    enum EAxisObject
-    {
-      kParticle,
-      kPair,
-      kEvent,
-      kNone
-    };
-
-    AliRsnValue(EAxisType type = kAxisTypes);
+    AliRsnValue();
+    AliRsnValue(const char *name, EValueType type, Int_t n, Double_t min, Double_t max);
+    AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
+    AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fType(copy.fType),fNBins(copy.fNBins),fMin(copy.fMin),fMax(copy.fMax),fValue(copy.fValue) {}
+    AliRsnValue& operator=(const AliRsnValue& copy) {SetName(copy.GetName());fType=copy.fType;fNBins=copy.fNBins;fMin=copy.fMin;fMax=copy.fMax;fValue=copy.fValue;return (*this);}
     virtual ~AliRsnValue() { }
+    
+    //const char* GetName() const;
+    Int_t       GetNBins() const {return fNBins;}
+    Double_t    GetMin() const {return fMin;}
+    Double_t    GetMax() const {return fMax;}
+    TArrayD     GetArray() const;
+    Double_t    GetValue() const {return fValue;}
+    EValueType  GetValueType() {return fType;}
 
-    virtual const char* GetName() const;
-    EAxisObject         GetAxisObject() const;
-    void                SetType(EAxisType type) {fType = type;}
-    EAxisType           GetAxisType() {return fType;}
-    Double_t            Eval(TObject * const obj, const AliRsnPairDef *pairDef = 0x0) const;
+    void        SetValueType(EValueType type) {fType = type;}
+    void        SetBins(Int_t n, Double_t min, Double_t max);
+    void        SetBins(Double_t min, Double_t max, Double_t step);
+    
+    Bool_t      Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event);
 
   private:
 
-    EAxisType fType;    // value type
-
+    EValueType fType;    // value type
+    Int_t      fNBins;   // number of bins (when applicable)
+    Double_t   fMin;     // lower edge
+    Double_t   fMax;     // upper edge
+    Double_t   fValue;   // computed value
+    
     // ROOT dictionary
     ClassDef(AliRsnValue, 1)
 };