]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnLoopPair.h
Adding macro to plot <Ncoll>
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnLoopPair.h
1 #ifndef ALIRSNLOOPPAIR_H
2 #define ALIRSNLOOPPAIR_H
3
4 //
5 // Class to combine pairs of daughters.
6 // See general definition inf mother class AliRsnLoop
7 // This is the only implementation which takes into account mixing objects.
8 //
9
10 #include "AliRsnLoop.h"
11
12 class TList;
13 class AliRsnEvent;
14 class AliRsnPairDef;
15
16 class AliRsnLoopPair : public AliRsnLoop {
17 public:
18
19    AliRsnLoopPair(const char *name = "default", AliRsnPairDef *def = 0, Bool_t isMixed = kFALSE);
20    AliRsnLoopPair(const AliRsnLoopPair &copy);
21    AliRsnLoopPair &operator=(const AliRsnLoopPair &copy);
22    ~AliRsnLoopPair();
23
24    // getters
25    Bool_t         IsTrueMC()     const {return fTrueMC;}
26    Bool_t         IsOnlyTrue()   const {return fOnlyTrue;}
27    Bool_t         IsCheckDecay() const {return fCheckDecay;}
28    AliRsnPairDef *GetPairDef()         {return fPairDef;}
29    AliRsnCutSet  *GetPairCuts()        {return fPairCuts;}
30    AliRsnMother  *GetMother()          {return &fMother;}
31
32    // setters (not for all members)
33    void           SetPairCuts(AliRsnCutSet *cuts)      {fPairCuts = cuts;}
34    void           SetTrueMC(Bool_t yn = kTRUE)         {fTrueMC = yn;}
35    void           SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;}
36    void           SetMCRefInfo(Bool_t b = kTRUE)       {fUseMCRef = b;}
37    void           SetCheckDecay(Bool_t check = kTRUE)  {fCheckDecay = check;}
38    void           SetListID(Int_t i, Int_t val)        {if (i==0||i==1) fListID[i] = val;}
39    void           SetRangeY(Double_t range)            {fRangeY = range;}
40    void           SetRangeDCAproduct(Double_t range)   {fRangeDCAproduct = range;}
41
42    // methods
43    Bool_t         IsTrueMother();
44    virtual void   Print(Option_t *opt = "") const;
45    virtual Bool_t Init(const char *prefix, TList *list);
46    virtual Int_t  DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
47
48 protected:
49
50    Bool_t AssignMotherAndDaughters   (AliRsnEvent *event, Int_t ipart);
51    Bool_t AssignMotherAndDaughtersESD(AliRsnEvent *event, Int_t ipart);
52    Bool_t AssignMotherAndDaughtersAOD(AliRsnEvent *event, Int_t ipart);
53    Int_t  LoopTrueMC(AliRsnEvent *event);
54
55    Bool_t            fTrueMC;          //  if this flag is TRUE, scan the MC for all true resonances from MC
56    Bool_t            fOnlyTrue;        //  select true pairs only?
57    Bool_t            fUseMCRef;        //  uses MC ref instead of REC
58    Bool_t            fCheckDecay;      //  is the decay channel correct in a true pair?
59    Int_t             fListID[2];       //  indexes of the two entry lists to be used
60    Double_t          fRangeY;          //  range in rapidity (serves always)
61    Double_t          fRangeDCAproduct; //  range in the daughters's DCA product
62
63    AliRsnPairDef    *fPairDef;         //  pair definition
64    AliRsnCutSet     *fPairCuts;        //  collection of all cuts
65    AliRsnMother      fMother;          //! mother candidate (to avoid creating it continuously)
66    AliRsnDaughter    fDaughter[2];     //! daughter candidates
67
68 private:
69
70    ClassDef(AliRsnLoopPair, 5)
71 };
72
73 #endif
74