]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnFunction.h
Removed old ME classes, since the nex event mixing has been introduced and is integra...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnFunction.h
CommitLineData
13f28255 1//
2// Class AliRsn Fcn
3//
4// This class defines a base classe to implement a typical computation
5// which uses the internal RSN package event format (AliRsnEvent).
6// It contains some default flags which turn out to be useful:
7// - a flag to select only the "true" pairs (tracks from same resonance)
8// - a flag to know if the computation is done over two events (mixing)
9//
10// Any kind of analysis object should be implemented as inheriting from this
11// because the AliRsnAnalyzer which executes the analysis will accept a collection
12// of such objects, in order to have a unique format of processing method
13//
e0baff8c 14// The user who implements a kind of computation type should inherit from
15// this class and override the virtual functions defined in it, which
13f28255 16// initialize the final output histogram and define how to process data.
17//
18//
19// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
20//
21
4fbb2459 22#ifndef ALIRSNFUNCTION_H
23#define ALIRSNFUNCTION_H
13f28255 24
b2028424 25#include <TClonesArray.h>
eb079724 26#include <TH1.h>
27#include <TH2.h>
28#include <TH3.h>
b2028424 29#include <THnSparse.h>
5eb970a4 30#include <TNamed.h>
13f28255 31
32#include "AliRsnCut.h"
13f28255 33
2dab9030 34class AliRsnValue;
35class AliRsnMother;
5eb970a4 36class AliRsnPairDef;
13f28255 37
2a1c7696 38class AliRsnFunction : public TObject {
13f28255 39
2a1c7696 40public:
13f28255 41
2a1c7696 42 AliRsnFunction(Bool_t useTH1 = kTRUE);
43 AliRsnFunction(const AliRsnFunction &copy);
44 virtual ~AliRsnFunction() { delete fH1; delete fHSparse; }
45 const AliRsnFunction& operator=(const AliRsnFunction &copy);
13f28255 46
2a1c7696 47 void SetPairDef(AliRsnPairDef * const def) {fPairDef = def;}
48 void SetPair(AliRsnMother * const pair) {fPair = pair;}
13f28255 49
2a1c7696 50 AliRsnPairDef* GetPairDef() const {return fPairDef;}
51 AliRsnMother* GetPair() const {return fPair;}
52 AliRsnEvent* GetEvent() const {return fEvent;}
53 virtual const char* GetName() const;
13f28255 54
2a1c7696 55 Bool_t IsUsingTH1() {return fUseTH1;}
56 void UseTH1() {fUseTH1 = kTRUE;}
57 void UseSparse() {fUseTH1 = kFALSE;}
58 Bool_t AddAxis(AliRsnValue* const axis);
59 Int_t GetNumberOfAxes() {return fAxisList.GetEntries();}
60 TH1* CreateHistogram(const char *histoName, const char *histoTitle);
61 THnSparseF* CreateHistogramSparse(const char *histoName, const char *histoTitle);
e0baff8c 62
2a1c7696 63 Bool_t Fill();
e0baff8c 64
2a1c7696 65protected:
e0baff8c 66
2a1c7696 67 AliRsnPairDef *fPairDef; // reference to used pair definition
68 TClonesArray fAxisList; // list of axis
e0baff8c 69
2a1c7696 70 AliRsnMother *fPair; // processed pair
71 AliRsnEvent *fEvent; // processed event
13f28255 72
2a1c7696 73 Bool_t fUseTH1; // use TH1 or not?
74 Int_t fSize; // number of dim of output histogram
75 TH1 *fH1; // output histogram (standard type)
76 THnSparseF *fHSparse; // output histogram (sparse type)
e0baff8c 77
2a1c7696 78 // ROOT dictionary
79 ClassDef(AliRsnFunction, 3)
13f28255 80};
81
82#endif