1 #ifndef ALIDIELECTRONMIXINGHANDLER_H
2 #define ALIDIELECTRONMIXINGHANDLER_H
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //#############################################################
9 //# Class AliDielectronMixingHandler #
12 //# Jens Wiechula, Uni-Tübingen / Jens.Wiechula@cern.ch #
14 //#############################################################
17 #include <TObjArray.h>
18 #include <TClonesArray.h>
20 #include "AliDielectronVarManager.h"
26 class AliDielectronMixingHandler : public TNamed {
34 AliDielectronMixingHandler();
35 AliDielectronMixingHandler(const char*name, const char* title);
37 virtual ~AliDielectronMixingHandler();
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 void AddVariable(AliDielectronVarManager::ValueTypes type, TVectorD* const bins);
44 void SetDepth(UShort_t depth) { fDepth=depth; }
45 UShort_t GetDepth() const { return fDepth; }
47 void SetMixType(EMixType type) { fMixType=type; }
48 EMixType GetMixType() const { return fMixType; }
50 void SetMixUncomplete(Bool_t mix) { fMixIncomplete=mix; }
51 Bool_t GetMixUncomplete() const { return fMixIncomplete; }
53 void SetMoveToSameVertex(Bool_t move) { fMoveToSameVertex=move; }
54 Bool_t GetMoveToSameVertex() const { return fMoveToSameVertex; }
56 void SetSkipFirstEvent(Bool_t skip) { fSkipFirstEvt=skip; }
58 Int_t GetNumberOfBins() const;
59 Int_t FindBin(const Double_t values[], TString *dim=0x0);
60 void Fill(const AliVEvent *ev, AliDielectron *diele);
62 Bool_t MixRemaining(AliDielectron *diele, Int_t ipool);
64 void Init(const AliDielectron *diele=0x0);
65 static void MoveToSameVertex(AliVTrack * const vtrack, const Double_t vFirst[3], const Double_t vMix[3]);
68 UShort_t fDepth; //Number of events per bin to start the merging
69 TClonesArray fArrPools; //Array of events in bins
71 UShort_t fEventCuts[kMaxCuts]; //cut variables
72 TObjArray fAxes; //Axis descriptions of the event binning
74 EMixType fMixType; // which combinations to include in the mixing
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
78 Bool_t fSkipFirstEvt; //whether to skip the first event in the pool
80 TProcessID *fPID; //! internal PID for references to buffered objects
82 void DoMixing(TClonesArray &pool, AliDielectron *diele);
84 AliDielectronMixingHandler(const AliDielectronMixingHandler &c);
85 AliDielectronMixingHandler &operator=(const AliDielectronMixingHandler &c);
88 ClassDef(AliDielectronMixingHandler,1) // Dielectron MixingHandler