]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnPair.h
Package revised - New AnalysisTask's - Added more functions
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPair.h
CommitLineData
aec0ec32 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
24class AliRsnFunction;
25
26class 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 enum EOutputType
40 {
41 kInvMass = 0,
42 kInvMassResolution,
43 kOutputTypes
44 };
45
46
47 AliRsnPair (EPairType type = kRealisticPID, AliRsnPairDef *def = 0, Int_t mixNum = 1);
48 ~AliRsnPair();
49
50 void Init();
51 void Print();
52 void ProcessPair(AliRsnEventBuffer *buf);
53 void SetCutMgr(AliRsnCutMgr* theValue) { fCutMgr = theValue; }
54 void AddFunction(AliRsnFunction *fcn);
55 TList* GenerateHistograms(TString prefix = "");
56 void GenerateHistograms(TString prefix, TList *tgt);
57
58 TString GetPairTypeName(EPairType type);
59 TString GetPairName();
60 TString GetPairHistName(AliRsnFunction *fcn, TString text = "");
61 TString GetPairHistTitle(AliRsnFunction *fcn, TString text="");
62
63 private:
64
65 AliRsnPair (const AliRsnPair &copy) : TObject(copy),
66 fIsMixed(kFALSE),fUseMC(kFALSE),fIsLikeSign(kFALSE),fMixNum(1),
67 fPairDef(0x0),fPairType(kPairTypes),fTypePID(AliRsnDaughter::kRealistic),
68 fCutMgr(0x0),fFunctions("AliRsnFunction",0) {}
69 AliRsnPair& operator=(const AliRsnPair&) {return *this;}
70
71 void SetUp(EPairType type); // sets up all flags
72 void SetAllFlags(AliRsnDaughter::EPIDMethod pidType,Bool_t isMix, Bool_t useMC);
73 AliRsnEvent* FindEventByEventCut(AliRsnEventBuffer *buf,Int_t & num);
74 void LoopPair(AliRsnEvent *ev1,TArrayI *a1,AliRsnEvent *ev2,TArrayI *a2);
75
76 void FillHistogram(EOutputType type,AliRsnPairParticle*pairPart);
77 void FillEffMass(EOutputType type,AliRsnPairParticle*pairPart);
78 void FillResolution(EOutputType type,AliRsnPairParticle*pairPart);
79
80 TString GetOutputTypeName(EOutputType type);
81 TString GetOutputTypeTitle(EOutputType type);
82
83 Bool_t CutPass(AliRsnDaughter *d);
84 Bool_t CutPass(AliRsnPairParticle *p);
85 Bool_t CutPass(AliRsnEvent *e);
86
87 // flags & integer data
88 Bool_t fIsMixed; // doing event-mixing ?
89 Bool_t fUseMC; // using MC inv. mass ?
90 Bool_t fIsLikeSign; // is a like-sign pair ?
91 Int_t fMixNum; // number of mixed events
92
93 // work management
94 AliRsnPairDef *fPairDef; // pair definition (particles, charges)
95 EPairType fPairType; // pair type (PID + mixing or not)
96 AliRsnDaughter::EPIDMethod fTypePID; // pid type variable for single track
97 AliRsnCutMgr *fCutMgr; // cut manager
98 TClonesArray fFunctions; // functions
99
100 ClassDef (AliRsnPair, 1)
101};
102
103#endif