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);
43 void SetDepth(UShort_t depth) { fDepth=depth; }
44 UShort_t GetDepth() const { return fDepth; }
46 void SetMixType(EMixType type) { fMixType=type; }
47 EMixType GetMixType() const { return fMixType; }
49 void SetMixUncomplete(Bool_t mix) { fMixIncomplete=mix; }
50 Bool_t GetMixUncomplete() const { return fMixIncomplete; }
52 void SetMoveToSameVertex(Bool_t move) { fMoveToSameVertex=move; }
53 Bool_t GetMoveToSameVertex() const { return fMoveToSameVertex; }
55 void SetSkipFirstEvent(Bool_t skip) { fSkipFirstEvt=skip; }
57 Int_t GetNumberOfBins() const;
58 Int_t FindBin(const Double_t values[], TString *dim=0x0);
59 void Fill(const AliVEvent *ev, AliDielectron *diele);
61 void MixRemaining(AliDielectron *diele);
63 void Init(const AliDielectron *diele=0x0);
64 static void MoveToSameVertex(AliVTrack * const vtrack, const Double_t vFirst[3], const Double_t vMix[3]);
67 UShort_t fDepth; //Number of events per bin to start the merging
68 TClonesArray fArrPools; //Array of events in bins
70 UShort_t fEventCuts[kMaxCuts]; //cut variables
71 TObjArray fAxes; //Axis descriptions of the event binning
73 EMixType fMixType; // which combinations to include in the mixing
75 Bool_t fMixIncomplete; // whether to mix uncomplete bins at the end of the processing
76 Bool_t fMoveToSameVertex; //whether to move the mixed tracks to the same vertex position
77 Bool_t fSkipFirstEvt; //whether to skip the first event in the pool
79 TProcessID *fPID; //! internal PID for references to buffered objects
81 void DoMixing(TClonesArray &pool, AliDielectron *diele);
83 AliDielectronMixingHandler(const AliDielectronMixingHandler &c);
84 AliDielectronMixingHandler &operator=(const AliDielectronMixingHandler &c);
87 ClassDef(AliDielectronMixingHandler,1) // Dielectron MixingHandler