CbmRoot
Loading...
Searching...
No Matches
PairAnalysisMixingHandler.h
Go to the documentation of this file.
1#ifndef PAIRANALYSISMIXINGHANDLER_H
2#define PAIRANALYSISMIXINGHANDLER_H
3
4/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. */
5
6//#############################################################
7//# #
8//# Class PairAnalysisMixingHandler #
9//# #
10//# Authors: #
11//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
12//# #
13//#############################################################
14
15#include <TClonesArray.h>
16#include <TNamed.h>
17#include <TObjArray.h>
18#include <TProcessID.h>
19
21
22class PairAnalysis;
25
26class PairAnalysisMixingHandler : public TNamed {
27public:
28 enum class EMixType
29 {
30 kOSonly = 0,
32 kAll
33 };
35 PairAnalysisMixingHandler(const char* name, const char* title);
36
38
39 void AddVariable(PairAnalysisVarManager::ValueTypes type, TVectorD* const bins);
40
41 void SetDepth(UShort_t depth) { fDepth = depth; }
42 UShort_t GetDepth() const { return fDepth; }
43
44 void SetMixType(EMixType type) { fMixType = type; }
45 EMixType GetMixType() const { return fMixType; }
46
47 Int_t GetNumberOfBins() const;
48 Int_t FindBin(const Double_t values[], TString* dim = 0x0);
49 void Fill(const PairAnalysisEvent* ev, PairAnalysis* papa);
50
51 void Init(const PairAnalysis* papa = 0x0);
52
53private:
54 UShort_t fDepth = 10; // Number of events per bin to keep in the ring buffer
55 TClonesArray fArrPools; // Array of events in bins
56 static const Int_t fMaxCuts = 10;
57 UShort_t fEventCuts[fMaxCuts]; // cut variables
58 TObjArray fAxes; // Axis descriptions of the event binning
59 EMixType fMixType = EMixType::kOSonly; // which combinations to include in the mixing
60 TProcessID* fPID = NULL;
61
62 void DoMixing(TClonesArray& pool, PairAnalysis* papa);
63
66
67
68 ClassDef(PairAnalysisMixingHandler, 1) // Mixed event handler
69};
70
71
72#endif
void AddVariable(PairAnalysisVarManager::ValueTypes type, TVectorD *const bins)
PairAnalysisMixingHandler(const PairAnalysisMixingHandler &c)
void Init(const PairAnalysis *papa=0x0)
void DoMixing(TClonesArray &pool, PairAnalysis *papa)
internal PID for references to buffered objects
PairAnalysisMixingHandler & operator=(const PairAnalysisMixingHandler &c)
Int_t FindBin(const Double_t values[], TString *dim=0x0)
void Fill(const PairAnalysisEvent *ev, PairAnalysis *papa)