]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPair.h
Removed warnings from RESONANCES code
[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 "TH1.h"
14 #include "TH2.h"
15 #include "TList.h"
16
17 #include "AliRsnDaughter.h"
18 #include "AliRsnPairDef.h"
19 #include "AliRsnEventBuffer.h"
20 #include "AliRsnEvent.h"
21 #include "AliRsnCutMgr.h"
22 #include "AliRsnHistoDef.h"
23
24 class AliRsnFunction;
25
26 class AliRsnPair : public TObject
27 {
28   public:
29
30     enum EPairType
31     {
32       kNoPID = 0,    kNoPIDMix,
33       kRealisticPID, kRealisticPIDMix,
34       kPerfectPID,   kPerfectPIDMix,
35       kTruePairs,
36       kPairTypes
37     };
38
39     AliRsnPair(EPairType type = kRealisticPID, AliRsnPairDef *def = 0, Int_t mixNum = 1);
40     ~AliRsnPair();
41
42     void    Init();
43     void    Print(Option_t *option = "") const;
44     void    ProcessPair(AliRsnEventBuffer *buf);
45     void    SetCutMgr(AliRsnCutMgr* theValue) { fCutMgr = theValue; }
46     void    SetMixingCut(AliRsnCutSet* theValue) { fMixingCut = theValue; }
47     void    AddFunction(AliRsnFunction *fcn);
48     TList*  GenerateHistograms(TString prefix = "");
49     void    GenerateHistograms(TString prefix, TList *tgt);
50
51     TString GetPairTypeName(EPairType type) const;
52     TString GetPairName() const;
53     TString GetPairHistName(AliRsnFunction *fcn, TString text = "") const;
54     TString GetPairHistTitle(AliRsnFunction *fcn, TString text = "") const;
55
56   private:
57
58     AliRsnPair (const AliRsnPair &copy) : TObject(copy),
59       fIsMixed(kFALSE),fUseMC(kFALSE),fIsLikeSign(kFALSE),fMixNum(1),fMixingCut(0x0),
60       fPairDef(0x0),fPairType(kPairTypes),fTypePID(AliRsnDaughter::kRealistic),
61       fCutMgr(0x0),fFunctions("AliRsnFunction",0) {}
62     AliRsnPair& operator=(const AliRsnPair&) {return *this;}
63
64     void           SetUp(EPairType type);  // sets up all flags
65     void           SetAllFlags(AliRsnDaughter::EPIDMethod pidType,Bool_t isMix, Bool_t useMC);
66     AliRsnEvent*   FindEventByEventCut(AliRsnEventBuffer *buf,Int_t & num);
67     void           LoopPair(AliRsnEvent *ev1,TArrayI *a1,AliRsnEvent *ev2,TArrayI *a2);
68
69     Bool_t         CutPass(AliRsnDaughter *d);
70     Bool_t         CutPass(AliRsnPairParticle *p);
71     Bool_t         CutPass(AliRsnEvent *e);
72     
73     // flags & integer data
74     Bool_t         fIsMixed;                 // doing event-mixing ?
75     Bool_t         fUseMC;                   // using MC inv. mass ?
76     Bool_t         fIsLikeSign;              // is a like-sign pair ?
77     Int_t          fMixNum;                  // number of mixed events
78     AliRsnCutSet  *fMixingCut;               // cut for event mixing
79     
80     // work management
81     AliRsnPairDef              *fPairDef;                // pair definition (particles, charges)
82     EPairType                   fPairType;               // pair type (PID + mixing or not)
83     AliRsnDaughter::EPIDMethod  fTypePID;                // pid type variable for single track
84     AliRsnCutMgr               *fCutMgr;                 // cut manager
85     TClonesArray                fFunctions;              // functions
86
87     ClassDef (AliRsnPair, 1)
88 };
89
90 #endif