]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/EventMixing/AliMixEventPool.h
Fix for event mixing, when it was selecting events out of range of multiplicity cut
[u/mrichter/AliRoot.git] / ANALYSIS / EventMixing / AliMixEventPool.h
CommitLineData
c5e33610 1//
2// Class AliMixEventPool
3//
b425275c 4// AliMixEventPool is used to find
c5e33610 5// similar events
6//
7// author:
8// Martin Vala (martin.vala@cern.ch)
9//
10
11#ifndef ALIMIXEVENTPOOL_H
12#define ALIMIXEVENTPOOL_H
13
14#include <TObjArray.h>
15#include <TNamed.h>
16
17class TEntryList;
18class AliMixEventCutObj;
19class AliVEvent;
b425275c 20class AliMixEventPool : public TNamed {
21public:
22 AliMixEventPool(const char *name = "mixEventPool", const char *title = "Mix event pool");
23 AliMixEventPool(const AliMixEventPool &obj);
24 AliMixEventPool &operator= (const AliMixEventPool& obj);
25 virtual ~AliMixEventPool();
26
27 // prints object info
28 virtual void Print(const Option_t *option = "") const;
29
30 // inits correctly object
31 Int_t Init();
32
33 void CreateEntryListsRecursivly(Int_t index);
34 void SearchIndexRecursive(Int_t num, Int_t *i, Int_t *d, Int_t &index);
35 TEntryList *AddEntryList();
36
37 Bool_t AddEntry(Long64_t entry, AliVEvent *ev);
38 TEntryList *FindEntryList(AliVEvent *ev, Int_t &idEntryList);
39
40 void AddCut(AliMixEventCutObj *cut);
41
42 Bool_t NeedInit() { return (fListOfEntryList.GetEntries() == 0); }
43 TObjArray *GetListOfEntryLists() { return &fListOfEntryList; }
44 TObjArray *GetListOfEventCuts() { return &fListOfEventCuts; }
45
46 void SetCutValuesFromBinIndex(Int_t index);
47 void SetBufferSize(Int_t buffer) { fBufferSize = buffer; }
48 void SetMixNumber(Int_t numMix) { fMixNumber = numMix; }
49 Int_t GetBufferSize() const { return fBufferSize; }
50 Int_t GetMixNumber() const { return fMixNumber; }
51
52private:
53
54 TObjArray fListOfEntryList; // list of entry lists
55 TObjArray fListOfEventCuts; // list of entry lists
56
57 Int_t fBinNumber; // bin number
58 Int_t fBufferSize; // buffer size
59 Int_t fMixNumber; // mixing number
60
61 ClassDef(AliMixEventPool, 1)
c5e33610 62};
63
64#endif