]>
Commit | Line | Data |
---|---|---|
5720c765 | 1 | #ifndef ALIDIELECTRONMIXINGHANDLER_H |
2 | #define ALIDIELECTRONMIXINGHANDLER_H | |
3 | ||
4 | /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //############################################################# | |
8 | //# # | |
9 | //# Class AliDielectronMixingHandler # | |
10 | //# # | |
11 | //# Authors: # | |
12 | //# Jens Wiechula, Uni-Tübingen / Jens.Wiechula@cern.ch # | |
13 | //# # | |
14 | //############################################################# | |
15 | ||
16 | #include <TNamed.h> | |
17 | #include <TObjArray.h> | |
18 | #include <TClonesArray.h> | |
19 | ||
20 | #include "AliDielectronVarManager.h" | |
21 | ||
22 | class AliDielectron; | |
23 | class AliVTrack; | |
24 | class AliVEvent; | |
25 | ||
26 | class AliDielectronMixingHandler : public TNamed { | |
27 | public: | |
28 | enum { kMaxCuts=10 }; | |
29 | enum EMixType { | |
30 | kOSonly=0, | |
31 | kOSandLS, | |
32 | kAll | |
33 | }; | |
34 | AliDielectronMixingHandler(); | |
35 | AliDielectronMixingHandler(const char*name, const char* title); | |
36 | ||
37 | virtual ~AliDielectronMixingHandler(); | |
38 | ||
39 | void AddVariable(AliDielectronVarManager::ValueTypes type, Int_t nbins, | |
40 | Double_t min, Double_t max, Bool_t log=kFALSE); | |
41 | void AddVariable(AliDielectronVarManager::ValueTypes type, const char* binLimitStr); | |
1a656ab9 | 42 | void AddVariable(AliDielectronVarManager::ValueTypes type, TVectorD* const bins); |
5720c765 | 43 | |
44 | void SetDepth(UShort_t depth) { fDepth=depth; } | |
45 | UShort_t GetDepth() const { return fDepth; } | |
46 | ||
47 | void SetMixType(EMixType type) { fMixType=type; } | |
48 | EMixType GetMixType() const { return fMixType; } | |
49 | ||
50 | void SetMixUncomplete(Bool_t mix) { fMixIncomplete=mix; } | |
51 | Bool_t GetMixUncomplete() const { return fMixIncomplete; } | |
52 | ||
53 | void SetMoveToSameVertex(Bool_t move) { fMoveToSameVertex=move; } | |
54 | Bool_t GetMoveToSameVertex() const { return fMoveToSameVertex; } | |
55 | ||
07d7dd21 | 56 | void SetSkipFirstEvent(Bool_t skip) { fSkipFirstEvt=skip; } |
57 | ||
d327d9cd | 58 | Int_t GetNumberOfBins() const; |
5720c765 | 59 | Int_t FindBin(const Double_t values[], TString *dim=0x0); |
60 | void Fill(const AliVEvent *ev, AliDielectron *diele); | |
61 | ||
f6b5f163 | 62 | Bool_t MixRemaining(AliDielectron *diele, Int_t ipool); |
5720c765 | 63 | |
64 | void Init(const AliDielectron *diele=0x0); | |
65 | static void MoveToSameVertex(AliVTrack * const vtrack, const Double_t vFirst[3], const Double_t vMix[3]); | |
66 | ||
67 | private: | |
68 | UShort_t fDepth; //Number of events per bin to start the merging | |
69 | TClonesArray fArrPools; //Array of events in bins | |
70 | ||
71 | UShort_t fEventCuts[kMaxCuts]; //cut variables | |
72 | TObjArray fAxes; //Axis descriptions of the event binning | |
73 | ||
74 | EMixType fMixType; // which combinations to include in the mixing | |
75 | ||
76 | Bool_t fMixIncomplete; // whether to mix uncomplete bins at the end of the processing | |
77 | Bool_t fMoveToSameVertex; //whether to move the mixed tracks to the same vertex position | |
07d7dd21 | 78 | Bool_t fSkipFirstEvt; //whether to skip the first event in the pool |
79 | ||
4fae8ef9 | 80 | TProcessID *fPID; //! internal PID for references to buffered objects |
81 | ||
5720c765 | 82 | void DoMixing(TClonesArray &pool, AliDielectron *diele); |
83 | ||
84 | AliDielectronMixingHandler(const AliDielectronMixingHandler &c); | |
85 | AliDielectronMixingHandler &operator=(const AliDielectronMixingHandler &c); | |
86 | ||
87 | ||
88 | ClassDef(AliDielectronMixingHandler,1) // Dielectron MixingHandler | |
89 | }; | |
90 | ||
91 | ||
92 | ||
93 | #endif |