2 // *** Class AliRsnPair ***
6 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
7 // M. Vala (email: martin.vala@cern.ch)
17 #include "AliRsnDaughter.h"
18 #include "AliRsnPairDef.h"
19 #include "AliRsnEventBuffer.h"
20 #include "AliRsnEvent.h"
21 #include "AliRsnCutMgr.h"
22 #include "AliRsnHistoDef.h"
26 class AliRsnPair : public TObject
32 kNoPID = 0, kNoPIDMix,
33 kRealisticPID, kRealisticPIDMix,
34 kPerfectPID, kPerfectPIDMix,
47 AliRsnPair (EPairType type = kRealisticPID, AliRsnPairDef *def = 0, Int_t mixNum = 1);
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);
58 TString GetPairTypeName(EPairType type);
59 TString GetPairName();
60 TString GetPairHistName(AliRsnFunction *fcn, TString text = "");
61 TString GetPairHistTitle(AliRsnFunction *fcn, TString text="");
65 AliRsnPair (const AliRsnPair ©) : 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;}
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);
76 void FillHistogram(EOutputType type,AliRsnPairParticle*pairPart);
77 void FillEffMass(EOutputType type,AliRsnPairParticle*pairPart);
78 void FillResolution(EOutputType type,AliRsnPairParticle*pairPart);
80 TString GetOutputTypeName(EOutputType type);
81 TString GetOutputTypeTitle(EOutputType type);
83 Bool_t CutPass(AliRsnDaughter *d);
84 Bool_t CutPass(AliRsnPairParticle *p);
85 Bool_t CutPass(AliRsnEvent *e);
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
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
100 ClassDef (AliRsnPair, 1)