]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliDielectronMixingHandler.h
Minor bugfix
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronMixingHandler.h
CommitLineData
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
22class AliDielectron;
23class AliVTrack;
24class AliVEvent;
25
26class AliDielectronMixingHandler : public TNamed {
27public:
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);
42
43 void SetDepth(UShort_t depth) { fDepth=depth; }
44 UShort_t GetDepth() const { return fDepth; }
45
46 void SetMixType(EMixType type) { fMixType=type; }
47 EMixType GetMixType() const { return fMixType; }
48
49 void SetMixUncomplete(Bool_t mix) { fMixIncomplete=mix; }
50 Bool_t GetMixUncomplete() const { return fMixIncomplete; }
51
52 void SetMoveToSameVertex(Bool_t move) { fMoveToSameVertex=move; }
53 Bool_t GetMoveToSameVertex() const { return fMoveToSameVertex; }
54
d327d9cd 55 Int_t GetNumberOfBins() const;
5720c765 56 Int_t FindBin(const Double_t values[], TString *dim=0x0);
57 void Fill(const AliVEvent *ev, AliDielectron *diele);
58
59 void MixRemaining(AliDielectron *diele);
60
61 void Init(const AliDielectron *diele=0x0);
62 static void MoveToSameVertex(AliVTrack * const vtrack, const Double_t vFirst[3], const Double_t vMix[3]);
63
64private:
65 UShort_t fDepth; //Number of events per bin to start the merging
66 TClonesArray fArrPools; //Array of events in bins
67
68 UShort_t fEventCuts[kMaxCuts]; //cut variables
69 TObjArray fAxes; //Axis descriptions of the event binning
70
71 EMixType fMixType; // which combinations to include in the mixing
72
73 Bool_t fMixIncomplete; // whether to mix uncomplete bins at the end of the processing
74 Bool_t fMoveToSameVertex; //whether to move the mixed tracks to the same vertex position
4fae8ef9 75
76 TProcessID *fPID; //! internal PID for references to buffered objects
77
5720c765 78 void DoMixing(TClonesArray &pool, AliDielectron *diele);
79
80 AliDielectronMixingHandler(const AliDielectronMixingHandler &c);
81 AliDielectronMixingHandler &operator=(const AliDielectronMixingHandler &c);
82
83
84 ClassDef(AliDielectronMixingHandler,1) // Dielectron MixingHandler
85};
86
87
88
89#endif