CbmRoot
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 
20 #include "PairAnalysisVarManager.h"
21 
22 class PairAnalysis;
23 class PairAnalysisTrack;
24 class PairAnalysisEvent;
25 
26 class PairAnalysisMixingHandler : public TNamed {
27 public:
28  enum { kMaxCuts = 10 };
29  enum EMixType { kOSonly = 0, kOSandLS, kAll };
31  PairAnalysisMixingHandler(const char* name, const char* title);
32 
34 
36  TVectorD* const bins);
37 
38  void SetDepth(UShort_t depth) { fDepth = depth; }
39  UShort_t GetDepth() const { return fDepth; }
40 
41  void SetMixType(EMixType type) { fMixType = type; }
42  EMixType GetMixType() const { return fMixType; }
43 
44  Int_t GetNumberOfBins() const;
45  Int_t FindBin(const Double_t values[], TString* dim = 0x0);
46  void Fill(const PairAnalysisEvent* ev, PairAnalysis* papa);
47 
48  void Init(const PairAnalysis* papa = 0x0);
49 
50 private:
51  UShort_t fDepth = 10; // Number of events per bin to keep in the ring buffer
52  TClonesArray fArrPools; // Array of events in bins
53  UShort_t fEventCuts[kMaxCuts]; // cut variables
54  TObjArray fAxes; // Axis descriptions of the event binning
55  EMixType fMixType = kOSonly; // which combinations to include in the mixing
56  TProcessID* fPID = NULL;
57 
58  void DoMixing(TClonesArray& pool, PairAnalysis* papa);
59 
62 
63 
64  ClassDef(PairAnalysisMixingHandler, 1) // Mixed event handler
65 };
66 
67 
68 #endif
PairAnalysisMixingHandler::Init
void Init(const PairAnalysis *papa=0x0)
Definition: PairAnalysisMixingHandler.cxx:229
PairAnalysisMixingHandler::FindBin
Int_t FindBin(const Double_t values[], TString *dim=0x0)
Definition: PairAnalysisMixingHandler.cxx:265
PairAnalysisMixingHandler::fAxes
TObjArray fAxes
Definition: PairAnalysisMixingHandler.h:54
PairAnalysisMixingHandler::kAll
@ kAll
Definition: PairAnalysisMixingHandler.h:29
PairAnalysisMixingHandler::Fill
void Fill(const PairAnalysisEvent *ev, PairAnalysis *papa)
Definition: PairAnalysisMixingHandler.cxx:82
PairAnalysisMixingHandler::GetNumberOfBins
Int_t GetNumberOfBins() const
Definition: PairAnalysisMixingHandler.cxx:254
PairAnalysisMixingHandler::~PairAnalysisMixingHandler
virtual ~PairAnalysisMixingHandler()
Definition: PairAnalysisMixingHandler.cxx:57
PairAnalysisMixingHandler::GetDepth
UShort_t GetDepth() const
Definition: PairAnalysisMixingHandler.h:39
PairAnalysisTrack
Definition: PairAnalysisTrack.h:37
PairAnalysisMixingHandler::DoMixing
void DoMixing(TClonesArray &pool, PairAnalysis *papa)
internal PID for references to buffered objects
Definition: PairAnalysisMixingHandler.cxx:146
PairAnalysisMixingHandler::operator=
PairAnalysisMixingHandler & operator=(const PairAnalysisMixingHandler &c)
PairAnalysisMixingHandler::fPID
TProcessID * fPID
Definition: PairAnalysisMixingHandler.h:56
PairAnalysisMixingHandler::fEventCuts
UShort_t fEventCuts[kMaxCuts]
Definition: PairAnalysisMixingHandler.h:53
PairAnalysisMixingHandler::PairAnalysisMixingHandler
PairAnalysisMixingHandler(const PairAnalysisMixingHandler &c)
PairAnalysisVarManager.h
PairAnalysisMixingHandler::fDepth
UShort_t fDepth
Definition: PairAnalysisMixingHandler.h:51
PairAnalysisMixingHandler::kOSonly
@ kOSonly
Definition: PairAnalysisMixingHandler.h:29
PairAnalysisMixingHandler::SetMixType
void SetMixType(EMixType type)
Definition: PairAnalysisMixingHandler.h:41
PairAnalysisMixingHandler
Definition: PairAnalysisMixingHandler.h:26
PairAnalysisMixingHandler::EMixType
EMixType
Definition: PairAnalysisMixingHandler.h:29
PairAnalysisEvent
Definition: PairAnalysisEvent.h:25
PairAnalysisMixingHandler::fMixType
EMixType fMixType
Definition: PairAnalysisMixingHandler.h:55
PairAnalysisMixingHandler::GetMixType
EMixType GetMixType() const
Definition: PairAnalysisMixingHandler.h:42
PairAnalysisMixingHandler::PairAnalysisMixingHandler
PairAnalysisMixingHandler()
PairAnalysisMixingHandler::kMaxCuts
@ kMaxCuts
Definition: PairAnalysisMixingHandler.h:28
PairAnalysis
Definition: PairAnalysis.h:22
PairAnalysisVarManager::ValueTypes
ValueTypes
Definition: PairAnalysisVarManager.h:71
PairAnalysisMixingHandler::kOSandLS
@ kOSandLS
Definition: PairAnalysisMixingHandler.h:29
PairAnalysisMixingHandler::SetDepth
void SetDepth(UShort_t depth)
Definition: PairAnalysisMixingHandler.h:38
PairAnalysisMixingHandler::fArrPools
TClonesArray fArrPools
Definition: PairAnalysisMixingHandler.h:52
PairAnalysisMixingHandler::AddVariable
void AddVariable(PairAnalysisVarManager::ValueTypes type, TVectorD *const bins)
Definition: PairAnalysisMixingHandler.cxx:66