]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPair.h
1dda9fca485b68eb00eb3e4a2456ec551fe5ad25
[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
15 #include "AliRsnPairDef.h"
16 #include "AliRsnCutManager.h"
17 #include "AliRsnMother.h"
18
19 class TList;
20
21 class AliRsnPair : public TNamed {
22 public:
23
24    AliRsnPair(const char *name = "default", AliRsnPairDef *def = 0);
25    AliRsnPair(const AliRsnPair &copy);
26    AliRsnPair& operator=(const AliRsnPair&);
27    ~AliRsnPair();
28    
29    // getters
30    Bool_t            IsOnlyTrue()   const {return fOnlyTrue;}
31    Bool_t            IsCheckDecay() const {return fCheckDecay;}
32    Bool_t            IsMixed()      const {return fIsMixed;}
33    Int_t             GetCount()     const {return fCount;}
34    AliRsnPairDef*    GetPairDef()         {return fPairDef;}
35    AliRsnCutManager* GetCutManager()      {return &fCutManager;}
36    AliRsnMother*     GetMother()          {return &fMother;}
37    
38    // shortcuts to data-member getters
39    AliRsnCutSet*     GetCommonDaughterCuts() {return fCutManager.GetCommonDaughterCuts();}
40    AliRsnCutSet*     GetDaughter1Cuts()      {return fCutManager.GetDaughter1Cuts();}
41    AliRsnCutSet*     GetDaughter2Cuts()      {return fCutManager.GetDaughter2Cuts();}
42    AliRsnCutSet*     GetMotherCuts()         {return fCutManager.GetMotherCuts();}
43                      
44    // setters (not for all members)
45    void              SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;}
46    void              SetCheckDecay(Bool_t check = kTRUE)  {fCheckDecay = check;}
47    void              SetMixed(Bool_t doit = kTRUE)        {fIsMixed = doit;}
48    void              SetCount(Int_t count)                {fCount = count;}
49    void              ResetCount()                         {fCount = 0;}
50
51    // methods
52    Bool_t            Fill(AliRsnDaughter *d0, AliRsnDaughter *d1);
53    virtual void      Print(Option_t *option = "") const;
54    virtual void      Compute();
55    virtual void      Init(const char *prefix, TList *list);
56
57 protected:
58
59    Bool_t            fOnlyTrue;        //  select true pairs only?
60    Bool_t            fCheckDecay;      //  is the decay channel correct in a true pair?
61    Bool_t            fIsMixed;         //  is this an event-mixing?
62    Int_t             fCount;           //  counter incremented for each added pair
63
64    AliRsnPairDef    *fPairDef;         //  pair definition (particles, charges)
65    AliRsnCutManager  fCutManager;      //  collection of all cuts
66    AliRsnMother      fMother;          //  mother candidate (to avoid creating it continuously)
67
68 private:
69
70    ClassDef(AliRsnPair, 2)
71 };
72
73 #endif
74