]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPair.h
Fix of a bug that arises when adding more than 1 function to AliRsnPairFunctions
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPair.h
1 //
2 // *** Class AliRsnPair ***
3 //
4 // TODO
5 //
6 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
7 //          M. Vala (email: martin.vala@cern.ch)
8 //
9
10 #ifndef ALIRSNPAIR_H
11 #define ALIRSNPAIR_H
12
13 #include "TNamed.h"
14 #include "TClonesArray.h"
15
16 #include "AliRsnDaughter.h"
17 #include "AliRsnPairDef.h"
18 #include "AliRsnMother.h"
19 #include "AliRsnCutManager.h"
20 #include "AliRsnEvent.h"
21
22 class TH1;
23 class TH2;
24 class TList;
25 class TArrayI;
26
27 class AliRsnCutSet;
28 class AliRsnFunction;
29 class AliRsnValue;
30
31 class AliRsnPair : public TNamed {
32 public:
33
34    AliRsnPair(const char *name = "default", AliRsnPairDef *def = 0);
35    AliRsnPair(const AliRsnPair &copy);
36    AliRsnPair& operator=(const AliRsnPair&);
37    ~AliRsnPair();
38
39    void    SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;}
40    void    SetCheckDecay(Bool_t check = kTRUE)  {fCheckDecay = check;}
41
42    void    Print(Option_t *option = "") const;
43    void    SetMixed(Bool_t doit = kTRUE) {fIsMixed = doit;}
44    Bool_t  IsMixed() const {return fIsMixed;}
45
46    AliRsnCutManager* GetCutManager() {return &fCutManager;}
47    AliRsnMother*     GetMother() {return &fMother;}
48    AliRsnPairDef*    GetPairDef() {return fPairDef;}
49    Bool_t            Fill(AliRsnDaughter *d0, AliRsnDaughter *d1);
50    Int_t             GetCount() const {return fCount;}
51    void              ResetCount() {fCount = 0;}
52
53    virtual void      Compute();
54    virtual void      Init(const char *prefix, TList *list);
55
56 protected:
57
58    Bool_t            fOnlyTrue;        //  select true pairs only?
59    Bool_t            fCheckDecay;      //  is the decay channel correct in a true pair?
60    Bool_t            fIsMixed;         //  is this an event-mixing?
61    Int_t             fCount;           //  counter incremented for each added pair
62
63    AliRsnPairDef    *fPairDef;         //  pair definition (particles, charges)
64    AliRsnCutManager  fCutManager;      //  collection of all cuts
65    AliRsnMother      fMother;          //  mother candidate (to avoid creating it continuously)
66
67 private:
68
69    ClassDef(AliRsnPair, 2)
70 };
71
72 #endif
73