]>
Commit | Line | Data |
---|---|---|
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> |
26 | #include <THnSparse.h> | |
5eb970a4 | 27 | #include <TNamed.h> |
13f28255 | 28 | |
29 | #include "AliRsnCut.h" | |
13f28255 | 30 | |
4fbb2459 | 31 | class AliRsnFunctionAxis; |
32 | class AliRsnPairParticle; | |
5eb970a4 | 33 | class AliRsnPairDef; |
13f28255 | 34 | |
5eb970a4 | 35 | class AliRsnFunction : public TNamed |
13f28255 | 36 | { |
37 | ||
e0baff8c | 38 | public: |
13f28255 | 39 | |
13f28255 | 40 | AliRsnFunction(); |
13f28255 | 41 | AliRsnFunction(const AliRsnFunction ©); |
5eb970a4 | 42 | virtual ~AliRsnFunction() { delete fHistogram; } |
43 | const AliRsnFunction& operator=(const AliRsnFunction ©); | |
13f28255 | 44 | |
4fbb2459 | 45 | void SetPairDef(AliRsnPairDef * const def) {fPairDef = def;} |
46 | void SetTrack(AliRsnDaughter * const track) {fTrack = track;} | |
47 | void SetPair(AliRsnPairParticle * const pair) {fPair = pair;} | |
48 | void SetEvent(AliRsnEvent *const event) {fEvent = event;} | |
13f28255 | 49 | |
4fbb2459 | 50 | AliRsnPairDef* GetPairDef() const {return fPairDef;} |
51 | AliRsnDaughter* GetTrack() const {return fTrack;} | |
52 | AliRsnPairParticle* GetPair() const {return fPair;} | |
53 | AliRsnEvent* GetEvent() const {return fEvent;} | |
b2028424 | 54 | virtual const char* GetName() const; |
13f28255 | 55 | |
4fbb2459 | 56 | void AddAxis(AliRsnFunctionAxis*const axis); |
b2028424 | 57 | Int_t GetNumberOfAxes() {return fAxisList.GetEntries();} |
58 | THnSparseD* CreateHistogram(const char *histoName, const char *histoTitle); | |
e0baff8c | 59 | |
5eb970a4 | 60 | Bool_t Fill(); |
e0baff8c | 61 | |
5eb970a4 | 62 | protected: |
e0baff8c | 63 | |
5eb970a4 | 64 | AliRsnPairDef *fPairDef; // reference to used pair definition |
b2028424 | 65 | TClonesArray fAxisList; // list of axis |
e0baff8c | 66 | |
5eb970a4 | 67 | AliRsnDaughter *fTrack; // processed track |
68 | AliRsnPairParticle *fPair; // processed pair | |
69 | AliRsnEvent *fEvent; // processed event | |
13f28255 | 70 | |
b2028424 | 71 | THnSparseD *fHistogram; // output histogram |
e0baff8c | 72 | |
13f28255 | 73 | // ROOT dictionary |
b2028424 | 74 | ClassDef(AliRsnFunction, 3) |
13f28255 | 75 | }; |
76 | ||
77 | #endif |